由cocos2dx构建的.so文件继续在Android 2.2(Froyo)中显示UnsatisfiedLinkError

时间:2014-10-14 10:13:22

标签: android android-ndk cocos2d-x

我有一个带有.so文件的cocos2d-x android项目。 当使用Android平台版本8运行时,它会像下面的错误一样崩溃。

10-16 19:03:50.958: E/AndroidRuntime(3951): FATAL EXCEPTION: main
10-16 19:03:50.958: E/AndroidRuntime(3951): java.lang.ExceptionInInitializerError
10-16 19:03:50.958: E/AndroidRuntime(3951):   at java.lang.Class.newInstanceImpl(Native Method)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at java.lang.Class.newInstance(Class.java:1429)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2582)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2684)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at android.app.ActivityThread.access$2300(ActivityThread.java:126)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2038)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at android.os.Handler.dispatchMessage(Handler.java:99)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at android.os.Looper.loop(Looper.java:123)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at android.app.ActivityThread.main(ActivityThread.java:4632)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at java.lang.reflect.Method.invokeNative(Native Method)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at java.lang.reflect.Method.invoke(Method.java:521)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at dalvik.system.NativeStart.main(Native Method)
10-16 19:03:50.958: E/AndroidRuntime(3951): Caused by: java.lang.UnsatisfiedLinkError: Library game not found
10-16 19:03:50.958: E/AndroidRuntime(3951):   at java.lang.Runtime.loadLibrary(Runtime.java:461)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at java.lang.System.loadLibrary(System.java:557)
10-16 19:03:50.958: E/AndroidRuntime(3951):   at com.nwm.klp.client.sample.sample.<clinit>(sample.java:37)
10-16 19:03:50.958: E/AndroidRuntime(3951):   ... 15 more

我在正确的位置构建了libgame.so并加载了正确的名称。我敢肯定,因为它在另一个平台版本设备(果冻豆)中运行得非常好,据我所知,cocos2d-x支持8个版本。

你能就此提出一些建议吗?

谢谢。

0 个答案:

没有答案