1.6编译android报错,怎么破

  • Creator 版本号:1.6
  • 目标平台:Android-Studio
    08-21 17:33:32.951 30839-30839/org.cocos2d.helloworld D/dalvikvm: Trying to load lib /data/app-lib/org.cocos2d.helloworld-1/libcocos2djs.so 0x41985bc0
    08-21 17:33:33.011 30839-30839/org.cocos2d.helloworld E/dalvikvm: dlopen("/data/app-lib/org.cocos2d.helloworld-1/libcocos2djs.so") failed: dlopen failed: cannot locate symbol “rand” referenced by “libcocos2djs.so”…
    08-21 17:33:33.011 30839-30839/org.cocos2d.helloworld D/AndroidRuntime: Shutting down VM
    08-21 17:33:33.011 30839-30839/org.cocos2d.helloworld W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41658d58)
    08-21 17:33:33.021 30839-30839/org.cocos2d.helloworld E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.cocos2d.helloworld, PID: 30839
    java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “rand” referenced by “libcocos2djs.so”…
    at java.lang.Runtime.loadLibrary(Runtime.java:364)
    at java.lang.System.loadLibrary(System.java:526)
    at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:249)
    at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:265)
    at org.cocos2dx.javascript.AppActivity.onCreate(AppActivity.java:40)
    at android.app.Activity.performCreate(Activity.java:5231)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2246)
    at android.app.ActivityThread.access$800(ActivityThread.java:139)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5105)
    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:790)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
    at dalvik.system.NativeStart.main(Native Method)

xy

你选的 platform 版本可能高于了你的设备版本?

看到这个rand 我就知道了,用android-19就好 ~~~

这个情况 应该怎么去做兼容呢