我使用編譯一個新的項目,通過proj.android演播室:的Cocos2D-X v3.7.1不幸的是,libcocos2dx已經停止
cocos compile -p android --android-studio
但是,當我開始在Android設備上的應用程序,它讓我看到一個消息:
Unfortunately, libcocos2dx has stopped
你能幫幫我嗎?我做錯了什麼?
這裏是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)
這是一個新的HELLO WORLD項目。它必須正常工作 – HelloWorld
並且您沒有得到任何LogCat錯誤?一個NullPointerException或類似的東西? – Th3G4m3r