【发布时间】:2015-09-06 14:00:01
【问题描述】:
我正在通过 proj.android-studio 编译一个新项目,使用:
cocos compile -p android --android-studio
但是当我在安卓设备上启动应用程序时,它会显示一条消息:
很遗憾,libcocos2dx 已经停止了
你能帮帮我吗?我做错了什么?
这里是logcat:
09-07 12:07:47.711 23074-23074/? E/AndroidRuntime: FATAL EXCEPTION: main 进程: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) 在 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) 在 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(Native Method)
【问题讨论】: