Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88763

打包安卓进MainActivity有概率报空指针异常闪退

$
0
0

@coco6 写道:

Cocos Creator打包安卓,进MainActivity有概率报空指针异常,闪退,求大佬看看。闪退的概率不大,但偶尔会出现。

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.cocos2dx.lib.Cocos2dxActivity.runOnGLThread(java.lang.Runnable)' on a null object reference
at org.cocos2dx.lib.Cocos2dxHelper.runOnGLThread(Cocos2dxHelper.java:167)
at org.cocos2dx.lib.Cocos2dxAudioFocusManager.unregisterAudioFocusListener(Cocos2dxAudioFocusManager.java:118)
at org.cocos2dx.lib.Cocos2dxActivity.onDestroy(Cocos2dxActivity.java:376)
at org.cocos2dx.javascript.AppActivity.onDestroy(AppActivity.java:506)
at android.app.Activity.performDestroy(Activity.java:7684)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1306)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4824)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4857)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:39)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:150)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:73)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:226)
at android.app.ActivityThread.main(ActivityThread.java:7212)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:956)

为啥老是发不不了,太坑了吧

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88763

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>