在模拟器和浏览器上运行都正常,APK也可正常打包,但是安装运行黑屏闪退。在android studio下logcat日志如下:
07-19 08:57:31.605 30441-30441/com.vivigames.scmj E/linker: load_library(linker.cpp:761): library “libmaliinstr.so” not found
[ 07-19 08:57:31.607 30441:0x76e9 E/ ]
appName=com.vivigames.scmj, acAppName=com.android.cts.openglperf
[ 07-19 08:57:31.607 30441:0x76e9 E/ ]
0
[ 07-19 08:57:31.607 30441:0x76e9 E/ ]
appName=com.vivigames.scmj, acAppName=com.android.browser
[ 07-19 08:57:31.607 30441:0x76e9 E/ ]
0
07-19 08:57:31.611 30441-30441/com.vivigames.scmj D/GraphicBuffer: create handle(0x57d29e88) (w:1280, h:720, f:1)
07-19 08:57:31.615 30441-30441/com.vivigames.scmj D/GraphicBuffer: close handle(0x57d29e88) (w:1280 h:720 f:1)
07-19 08:57:31.619 30441-30441/com.vivigames.scmj D/GraphicBuffer: create handle(0x57d29e88) (w:1280, h:720, f:1)
07-19 08:57:31.622 30441-30441/com.vivigames.scmj D/OpenGLRenderer: Enabling debug mode 0
07-19 08:57:31.624 30441-30441/com.vivigames.scmj I/SurfaceView: Changes: creating=true format=true size=true visible=true left=true top=true mUpdateWindowNeeded=false mReportDrawNeeded=false redrawNeeded=false forceSizeChanged=true mVisible=false mRequestedVisible=true
07-19 08:57:31.627 30441-30441/com.vivigames.scmj I/SurfaceView: Cur surface: Surface(name=null, identity=-1)
07-19 08:57:31.630 30441-30453/com.vivigames.scmj V/SurfaceView: org.cocos2dx.lib.Cocos2dxGLSurfaceView{417b7178 VFE… .F…ID 0,0-1280,720} got resized: w=1280 h=720, cur w=-1 h=-1
07-19 08:57:31.633 30441-30441/com.vivigames.scmj I/SurfaceView: New surface: Surface(name=null, identity=9132), vis=true, frame=Rect(0, 0 - 1280, 720)
07-19 08:57:31.633 30441-30441/com.vivigames.scmj I/SurfaceView: visibleChanged – surfaceCreated
07-19 08:57:31.633 30441-30441/com.vivigames.scmj I/SurfaceView: surfaceChanged – format=4 w=1280 h=720
07-19 08:57:31.633 30441-30441/com.vivigames.scmj I/SurfaceView: surfaceRedrawNeeded
07-19 08:57:31.633 30441-30441/com.vivigames.scmj I/SurfaceView: finishedDrawing
07-19 08:57:31.637 30441-30441/com.vivigames.scmj V/SurfaceView: Layout: x=0 y=0 w=1280 h=720, frame=Rect(0, 0 - 1280, 720)
07-19 08:57:31.638 30441-30480/com.vivigames.scmj D/GraphicBuffer: create handle(0x5a8e6130) (w:1280, h:720, f:4)
07-19 08:57:31.641 30441-30441/com.vivigames.scmj I/SurfaceView: Changes: creating=false format=false size=false visible=false left=false top=false mUpdateWindowNeeded=true mReportDrawNeeded=true redrawNeeded=false forceSizeChanged=false mVisible=true mRequestedVisible=true
07-19 08:57:31.641 30441-30441/com.vivigames.scmj I/SurfaceView: Cur surface: Surface(name=null, identity=9132)
07-19 08:57:31.641 30441-30480/com.vivigames.scmj D/GraphicBuffer: close handle(0x5a8e6130) (w:1280 h:720 f:4)
07-19 08:57:31.644 30441-30480/com.vivigames.scmj D/GraphicBuffer: create handle(0x5a8e6130) (w:1280, h:720, f:4)
07-19 08:57:31.646 30441-30441/com.vivigames.scmj I/SurfaceView: New surface: Surface(name=null, identity=9132), vis=true, frame=Rect(0, 0 - 1280, 720)
07-19 08:57:31.646 30441-30441/com.vivigames.scmj I/SurfaceView: surfaceRedrawNeeded
07-19 08:57:31.646 30441-30441/com.vivigames.scmj I/SurfaceView: finishedDrawing
07-19 08:57:31.647 30441-30441/com.vivigames.scmj V/SurfaceView: Layout: x=0 y=0 w=1280 h=720, frame=Rect(0, 0 - 1280, 720)
07-19 08:57:31.695 30441-30441/com.vivigames.scmj D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=true
07-19 08:57:31.696 30441-30441/com.vivigames.scmj V/InputMethodManager: onWindowFocus: org.cocos2dx.lib.Cocos2dxGLSurfaceView{417b7178 VFE… .F…I. 0,0-1280,720} softInputMode=32 first=true flags=#1810500
07-19 08:57:31.696 30441-30441/com.vivigames.scmj V/InputMethodManager: START INPUT: org.cocos2dx.lib.Cocos2dxGLSurfaceView{417b7178 VFE… .F…I. 0,0-1280,720} ic=null tba=android.view.inputmethod.EditorInfo@417e8060 controlFlags=#105
07-19 08:57:31.698 30441-30441/com.vivigames.scmj V/InputMethodManager: Starting input: Bind result=InputBindResult{null com.baidu.input_huawei/.ImeService #4392}
07-19 08:57:31.712 30441-30441/com.vivigames.scmj D/GraphicBuffer: create handle(0x6087fb10) (w:1280, h:720, f:1)
07-19 08:57:31.801 30441-30480/com.vivigames.scmj W/dalvikvm: dvmFindClassByName rejecting ‘org/cocos2dx/lib/Cocos2dxLocalStorage’
07-19 08:57:31.877 30441-30480/com.vivigames.scmj D/cocos2d: android SDK version:17
07-19 08:57:31.881 30441-30448/com.vivigames.scmj D/jdwp: processIncoming
07-19 08:57:31.881 30441-30448/com.vivigames.scmj D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x40000049, flags=0x0, dataLen=0x9
07-19 08:57:31.881 30441-30448/com.vivigames.scmj D/jdwp: sendBufferedRequest : len=0x34
07-19 08:57:32.190 30441-30480/com.vivigames.scmj D/cocos2d-x debug info: Cocos2d-JS v3.13
07-19 08:57:32.381 30441-30448/com.vivigames.scmj D/jdwp: processIncoming
07-19 08:57:32.382 30441-30448/com.vivigames.scmj D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x4000004F, flags=0x0, dataLen=0x9
07-19 08:57:32.382 30441-30448/com.vivigames.scmj D/jdwp: sendBufferedRequest : len=0x34
07-19 08:57:32.532 30441-30480/com.vivigames.scmj E/cocos js error:: E:\ddmj_20161230\client\build\jsb-default\src\project.js line:1 msg:mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
07-19 08:57:32.552 30441-30441/com.vivigames.scmj D/FLQG_LOG: CustomDebug: CustomResult result : 80000 msg : CUSTOMRESULT_CUSTOMREXTENSION
07-19 08:57:32.622 30441-30480/com.vivigames.scmj V/SoundPool: autoResume()
07-19 08:57:32.622 30441-30480/com.vivigames.scmj D/FLQG_LOG: Statistics: onActionResult(UserDebug,0,init success)
07-19 08:57:32.623 30441-30480/com.vivigames.scmj W/FLQG_LOG: UserObject: callback of plugin UserDebug not set correctly
07-19 08:57:32.623 30441-30480/com.vivigames.scmj D/FLQG_LOG: Statistics: onActionResult(CustomDebug,80000,CUSTOMRESULT_CUSTOMREXTENSION)
07-19 08:57:32.623 30441-30480/com.vivigames.scmj W/FLQG_LOG: CustomObject: Listener of plugin CustomDebug not set correctly
07-19 08:57:32.624 30441-30480/com.vivigames.scmj D/FLQG_LOG: Statistics: onActionResult(RECDebug,0,init success)
07-19 08:57:32.624 30441-30480/com.vivigames.scmj W/FLQG_LOG: RECObject: Listener of plugin RECDebug not set correctly
07-19 08:57:32.779 30441-30480/com.vivigames.scmj D/GraphicBuffer: create handle(0x61c4e578) (w:1280, h:720, f:4)
07-19 08:57:32.786 30441-30480/com.vivigames.scmj D/GraphicBuffer: create handle(0x62041f38) (w:1280, h:720, f:4)
07-19 08:57:32.802 30441-30480/com.vivigames.scmj D/GraphicBuffer: create handle(0x620414b8) (w:1280, h:720, f:4)
07-19 08:57:32.883 30441-30448/com.vivigames.scmj D/jdwp: processIncoming
07-19 08:57:32.883 30441-30448/com.vivigames.scmj D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x40000050, flags=0x0, dataLen=0x9
07-19 08:57:32.883 30441-30448/com.vivigames.scmj D/jdwp: sendBufferedRequest : len=0x34
07-19 08:57:33.080 30441-30480/com.vivigames.scmj D/cocos2d-x debug info: Success to load scene: db://assets/resources/scenes/loading.fire
07-19 08:57:33.089 30441-30480/com.vivigames.scmj D/JniHelper: JniHelper::getJavaVM(), pthread_self() = 1518164560
07-19 08:57:33.089 30441-30480/com.vivigames.scmj W/dalvikvm: dvmFindClassByName rejecting ‘com/vivigames/voicesdk/VoiceRecorder’
07-19 08:57:33.090 30441-30480/com.vivigames.scmj W/dalvikvm: Invalid indirect reference 0x417efaa8 in decodeIndirectRef
07-19 08:57:33.090 30441-30480/com.vivigames.scmj A/libc: Fatal signal 11 (SIGSEGV) at 0x0000002c (code=1), thread 30480 (Thread-37729)
07-19 08:57:33.090 30441-30480/com.vivigames.scmj A/libc: Send stop signal to pid:30441 in debugger_signal_handler
用的是华为荣耀3c