我是eclipse的新手我不知道如何找到应用程序崩溃的原因。我正在编译cocos2d-x应用程序,我使用第一个build_native.sh文件进行编译,然后我在测试时使用Eclipse在设备上进行测试说不幸的是你的应用程序崩溃了
这是日志:
04-18 12:09:48.158: D/com.amazon.identity.auth.device.utils.MAPLog.PII(6012): Extracting verison incremental:<obscured>
04-18 12:09:48.168: D/com.amazon.identity.auth.device.utils.MAPLog.PII(6012): Incremental version '%s' was in invalid format.:<obscured>
04-18 12:09:48.168: I/com.amazon.identity.auth.device.authorization.PackageIntentReceiver(6012): Package Intent Received. Clearing Service Data. action=android.intent.action.PACKAGE_REPLACED
04-18 12:09:48.168: I/com.amazon.identity.auth.device.authorization.ThirdPartyServiceHelper(6012): Clearing Highest Versioned Service
04-18 12:09:48.829: W/dalvikvm(6012): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/goldcoin/letitredfree/MainActivity;
04-18 12:09:48.829: W/dalvikvm(6012): Class init failed in newInstance call (Lcom/goldcoin/letitredfree/MainActivity;)
04-18 12:09:48.829: W/dalvikvm(6012): threadid=1: thread exiting with uncaught exception (group=0x40bf41f8)
04-18 12:09:48.829: E/AndroidRuntime(6012): FATAL EXCEPTION: main
04-18 12:09:48.829: E/AndroidRuntime(6012): java.lang.ExceptionInInitializerError
04-18 12:09:48.829: E/AndroidRuntime(6012): at java.lang.Class.newInstanceImpl(Native Method)
04-18 12:09:48.829: E/AndroidRuntime(6012): at java.lang.Class.newInstance(Class.java:1319)
04-18 12:09:48.829: E/AndroidRuntime(6012): at android.app.Instrumentation.newActivity(Instrumentation.java:1026)
04-18 12:09:48.829: E/AndroidRuntime(6012): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1883)
04-18 12:09:48.829: E/AndroidRuntime(6012): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1993)
04-18 12:09:48.829: E/AndroidRuntime(6012): at android.app.ActivityThread.access$600(ActivityThread.java:127)
04-18 12:09:48.829: E/AndroidRuntime(6012): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159)
04-18 12:09:48.829: E/AndroidRuntime(6012): at android.os.Handler.dispatchMessage(Handler.java:99)
04-18 12:09:48.829: E/AndroidRuntime(6012): at android.os.Looper.loop(Looper.java:137)
04-18 12:09:48.829: E/AndroidRuntime(6012): at android.app.ActivityThread.main(ActivityThread.java:4512)
04-18 12:09:48.829: E/AndroidRuntime(6012): at java.lang.reflect.Method.invokeNative(Native Method)
04-18 12:09:48.829: E/AndroidRuntime(6012): at java.lang.reflect.Method.invoke(Method.java:511)
04-18 12:09:48.829: E/AndroidRuntime(6012): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
04-18 12:09:48.829: E/AndroidRuntime(6012): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:561)
04-18 12:09:48.829: E/AndroidRuntime(6012): at dalvik.system.NativeStart.main(Native Method)
04-18 12:09:48.829: E/AndroidRuntime(6012): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1285]: 170 cannot locate '__isnanf'...
04-18 12:09:48.829: E/AndroidRuntime(6012): at java.lang.Runtime.loadLibrary(Runtime.java:370)
04-18 12:09:48.829: E/AndroidRuntime(6012): at java.lang.System.loadLibrary(System.java:535)
04-18 12:09:48.829: E/AndroidRuntime(6012): at com.goldcoin.letitredfree.MainActivity.<clinit>(MainActivity.java:127)
04-18 12:09:48.829: E/AndroidRuntime(6012): ... 15 more
答案 0 :(得分:1)
似乎问题是编译器找不到你的库。这是您的项目还是您刚从互联网上下载的?如果是来自互联网,那么你还应该检查这个项目是否使用本机代码(它是否具有像.c,.cpp或.h文件的jni文件夹?)。如果是,那么您应该首先构建您的原生部分,然后才能构建您的代码。