Cocos2d-x v3.7.1不幸的是,libcocos2dx已停止

时间:2015-09-06 14:00:02

标签: android cocos2d-x

我正在通过proj.android-studio编译一个新项目:

cocos compile -p android --android-studio

但是当我在Android设备上启动应用程序时,它会向我显示一条消息:

  

不幸的是,libcocos2dx已停止

你能帮帮我吗?我做错了什么?

这是logcat:

  

09-07 12:07:47.711 23074-23074 /? E / AndroidRuntime:致命异常:主要       处理:org.cocos2dx.TestGame,PID:23074       java.lang.UnsatisfiedLinkError:dlopen失败:无法找到“libcocos2dcpp.so”引用的符号“srand”...               在java.lang.Runtime.loadLibrary(Runtime.java:371)               在java.lang.System.loadLibrary(System.java:553)               在org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:288)               at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:303)               在android.app.Activity.performCreate(Activity.java:5343)               在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)               在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2331)               在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2429)               在android.app.ActivityThread.access $ 800(ActivityThread.java:151)               在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1342)               在android.os.Handler.dispatchMessage(Handler.java:110)               在android.os.Looper.loop(Looper.java:193)               在android.app.ActivityThread.main(ActivityThread.java:5341)               at java.lang.reflect.Method.invokeNative(Native Method)               在java.lang.reflect.Method.invoke(Method.java:515)               在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:825)               在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)               在dalvik.system.NativeStart.main(本地方法)

1 个答案:

答案 0 :(得分:0)

如果您的代码包含错误,通常应用会停止工作。

代码中是否有错误? LogCat说什么?