简体   繁体   English

Android App崩溃原因

[英]Android App crash reason

I am new with eclipse I don't know how to find the why app is crashing at start. 我是eclipse的新手,我不知道如何找到启动时应用崩溃的原因。 I am compiling cocos2d-x app that I used first build_native.sh file to compile, then I used Eclipse for testing on device when I tested it says unfortunately your app crashed 我正在编译使用第一个build_native.sh文件进行编译的cocos2d-x应用程序,然后在我测试它表示不幸的是您的应用程序崩溃时,我使用Eclipse在设备上进行了测试

Here is the log: 这是日志:

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

It seems that the problem is that the compiler cannot find your so libraries. 看来问题在于编译器找不到您的so库。 Is this your project or you just downloaded it from the Internet? 这是您的项目,还是您刚刚从Internet下载的项目? If it is from the Internet then you should also check if this project uses native code (does it have smth like jni folder with .c, .cpp or .h files?). 如果来自互联网,那么您还应该检查该项目是否使用本机代码(它是否具有像带有.c,.cpp或.h文件的jni文件夹之类的东西?)。 If yes, then you should at first build your native part and only after this you can make a build of your code. 如果是,那么首先应该构建本机部分,然后才能构建代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM