cocos creator 使用 android studio 打包黑屏,有遇到的朋友求解惑,谢谢大家

cocos creator 版本1.6.1
开始的时候用自己的项目打包黑屏换了creator 中的游戏示例也是黑屏
游戏示例能在浏览器和模拟器上运行
能够在creator上构建编译成功

进入游戏的黑屏日志
11-20 17:02:52.933 32033-32033/? I/art: Late-enabling -Xcheck:jni
11-20 17:02:53.067 32033-32052/org.cocos2d.helloworld E/HAL: load: id=gralloc != hmi->id=gralloc
11-20 17:02:53.194 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.352 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.410 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.474 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.535 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.589 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.655 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.712 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.784 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.835 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:53.912 32033-32033/org.cocos2d.helloworld W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a15 --instruction-set-features=default --dex-file=/data/app/org.cocos2d.helloworld-1/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@org.cocos2d.helloworld-1@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
11-20 17:02:54.049 32033-32033/org.cocos2d.helloworld I/HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl
11-20 17:02:54.537 32033-32033/org.cocos2d.helloworld I/AudioManager: requestAudioFocus() status : 1
11-20 17:02:54.537 32033-32033/org.cocos2d.helloworld I/AudioManager: requestAudioFocus() apk : org.cocos2d.helloworld
11-20 17:02:54.710 32033-32420/org.cocos2d.helloworld E/HAL: load: id=gralloc != hmi->id=gralloc
11-20 17:02:54.710 32033-32420/org.cocos2d.helloworld I/OpenGLRenderer: Initialized EGL, version 1.4
11-20 17:02:57.632 32033-32033/org.cocos2d.helloworld I/Hwaps: APS: version is 3.1.11
11-20 17:02:57.646 32033-32033/org.cocos2d.helloworld E/ApsLdfGameIdentify: binder error
11-20 17:02:57.655 32033-357/org.cocos2d.helloworld E/Hwaps: no data in database of APSAPPINFO
11-20 17:03:00.655 32033-358/org.cocos2d.helloworld E/Hwaps: no data in database of APSAPPINFO
11-20 17:03:00.662 32033-358/org.cocos2d.helloworld E/Hwaps: no data in database when query game time info
11-20 17:03:00.668 32033-358/org.cocos2d.helloworld E/Hwaps: no data in database when query game time info
是我少东西,还是少步骤,又碰到解决的希望帮助下,谢谢各位

再加一条这个或许有用
Error while executing: am start -n “org.cocos2d.start_project/org.cocos2dx.javascript.AppActivity” -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=org.cocos2d.start_project/org.cocos2dx.javascript.AppActivity }
Error type 3
Error: Activity class {org.cocos2d.start_project/org.cocos2dx.javascript.AppActivity} does not exist.

Error while Launching activity

APP abi这不用勾选么?

我试了,勾选了也没用

终于知道问题所在了,是我android studio 配置的问题.
首先我的cocos creator 中偏好设置中的ndk是我单独下载的
而android studio中有自己默认的ndk,我一直以为只用一个就行了,所以试着用android studio 打包时会出错,应该要在android studio中重新配置
或者自己下载android studio 内置的ndk

1赞