android studio打包出现黑屏报错

02-25 12:08:17.186: W/System.err(3126): org.json.JSONException: No value for serviceClassPath
02-25 12:08:17.186: W/System.err(3126): at org.json.JSONObject.get(JSONObject.java:354)
02-25 12:08:17.190: W/System.err(3126): at org.json.JSONObject.getJSONArray(JSONObject.java:544)
02-25 12:08:17.190: W/System.err(3126): at org.cocos2dx.javascript.SDKWrapper.loadSDKClass(SDKWrapper.java:70)
02-25 12:08:17.190: W/System.err(3126): at org.cocos2dx.javascript.SDKWrapper.setGLSurfaceView(SDKWrapper.java:102)
02-25 12:08:17.194: W/System.err(3126): at org.cocos2dx.javascript.AppActivity.onCreateView(AppActivity.java:59)
02-25 12:08:17.194: W/System.err(3126): at org.cocos2dx.lib.Cocos2dxActivity.addSurfaceView(Cocos2dxActivity.java:446)
02-25 12:08:17.194: W/System.err(3126): at org.cocos2dx.lib.Cocos2dxActivity.init(Cocos2dxActivity.java:261)
02-25 12:08:17.194: W/System.err(3126): at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:338)
02-25 12:08:17.194: W/System.err(3126): at org.cocos2dx.javascript.AppActivity.onCreate(AppActivity.java:39)
02-25 12:08:17.198: W/System.err(3126): at android.app.Activity.performCreate(Activity.java:5104)
02-25 12:08:17.198: W/System.err(3126): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1092)
02-25 12:08:17.198: W/System.err(3126): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
02-25 12:08:17.198: W/System.err(3126): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2254)
02-25 12:08:17.198: W/System.err(3126): at android.app.ActivityThread.access$600(ActivityThread.java:141)
02-25 12:08:17.198: W/System.err(3126): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
02-25 12:08:17.198: W/System.err(3126): at android.os.Handler.dispatchMessage(Handler.java:99)
02-25 12:08:17.198: W/System.err(3126): at android.os.Looper.loop(Looper.java:137)
02-25 12:08:17.198: W/System.err(3126): at android.app.ActivityThread.main(ActivityThread.java:5069)
02-25 12:08:17.198: W/System.err(3126): at java.lang.reflect.Method.invokeNative(Native Method)
02-25 12:08:17.198: W/System.err(3126): at java.lang.reflect.Method.invoke(Method.java:511)
02-25 12:08:17.198: W/System.err(3126): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-25 12:08:17.198: W/System.err(3126): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-25 12:08:17.198: W/System.err(3126): at dalvik.system.NativeStart.main(Native Method)

creator 版本 2.2.0

这个错误不会导致黑屏,看下是否有其他错误日志

02-25 17:09:13.124: D/jswrapper(1616): JS: [WARN]:
Script attached to ‘Canvas’ is missing or invalid. 发现一个scene加载不出来,canvas的脚本也没问题

试试这个版本,应该修复了

权限看了没什么问题,,

感觉是文件被占用了,重启电脑看看。

找到主要问题了,谢谢 D/jswrapper(1616): JS: [WARN]:
Script attached to ‘Canvas’ is missing or invalid 这个主要是配置了微信子包,会导致加载不到

2.2.1版本打包安卓报同样的错,然后黑屏

安卓不能配置微信子包的