Reputation: 31
I'm compiling a new project through proj.android-studio using:
cocos compile -p android --android-studio
But when I start app on android device, it shows me a message:
Unfortunately, libcocos2dx has stopped
Can you help me? What I'm doing wrong?
Here is logcat:
09-07 12:07:47.711 23074-23074/? E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: org.cocos2dx.TestGame, PID: 23074 java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "srand" referenced by "libcocos2dcpp.so"... at java.lang.Runtime.loadLibrary(Runtime.java:371) at java.lang.System.loadLibrary(System.java:553) at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:288) at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:303) at android.app.Activity.performCreate(Activity.java:5343) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2331) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2429) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1342) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5341) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641) at dalvik.system.NativeStart.main(Native Method)
Upvotes: 3
Views: 1437
Reputation:
Usually the app stops working if your code contains errors.
Are there errors in your code? What does the LogCat say?
Upvotes: 0