开发者

Figure out crash reason for a same project which crashes under certain target

开发者 https://www.devze.com 2023-03-14 06:16 出处:网络
I am targeting my application to be able run across Android 1.5 till 2.3. I create 2 AVDs Android 2.3.3 (API Level 10)

I am targeting my application to be able run across Android 1.5 till 2.3. I create 2 AVDs

Android 2.3.3 (API Level 10) 
Android 1.5   (API Level 3)

I found out my application able to launch in Android 2.3, but not 1.5. It crashes even before the application able to show up. I try to find out the root cause using the following way. Here is what I did.

I made the build target pointed to Android 1.5

Figure out crash reason for a same project which crashes under certain target

I Debug As -> 1 Android Application

Figure out crash reason for a same project which crashes under certain target

The crash breakpoint is pointing to Android code, and not my application code.

If I just Run As -> 1 Android Application, I will get the following

Figure out crash reason for a same project which crashes under certain target

If I run the same source code, by targeting Android 2.3.3, the application can be launched without problem.

Figure out crash reason for a same project which crashes under certain target

What is the correct way, for me to fig开发者_StackOverflow社区ure out, why the same project can crash under certain target, but run well under another target.


Usually there are more error specific messages in logcat. If that doesn't help I suggest you comment out all non-vital parts of your main Activity to see if the error dissappears. If it does, reintroduce the code parts out you commented out one by one to pinpoint what is causing the error.

BTW, do you really need to be 1.5 compliant? Hardly anyone is using it these days (see stats here)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号