Reputation: 216
I try to launch my Android application on my phone (Sony Ericsson Xperia Neo). It launches normally, but when I try to open it, I see a message saying so sorry, you application has stopped unexpectedly, please try again and the button force close. Also the size of the installed application is only 820KB, though it has to be something like 8-10MB. btw, my application runs fine on tablets, problems only on phone. Any help ? thanks.
Here it's logcat output
01-12 18:09:59.345: D/dalvikvm(2402): DexOpt: couldn't find field Landroid/content/res/Configuration;.smallestScreenWidthDp
01-12 18:09:59.345: W/dalvikvm(2402): VFY: unable to resolve instance field 17
01-12 18:09:59.345: D/dalvikvm(2402): VFY: replacing opcode 0x52 at 0x0012
01-12 18:09:59.345: D/dalvikvm(2402): VFY: dead code 0x0014-011f in Lcom/example/mis/MainActivity;.onCreate (Landroid/os/Bundle;)V
01-12 18:09:59.375: D/AndroidRuntime(2402): Shutting down VM
01-12 18:09:59.375: W/dalvikvm(2402): threadid=1: thread exiting with uncaught exception (group=0x2aac8578)
01-12 18:09:59.435: E/AndroidRuntime(2402): FATAL EXCEPTION: main
01-12 18:09:59.435: E/AndroidRuntime(2402): java.lang.NoSuchFieldError: android.content.res.Configuration.smallestScreenWidthDp
01-12 18:09:59.435: E/AndroidRuntime(2402): at com.example.mis.MainActivity.onCreate(MainActivity.java:59)
01-12 18:09:59.435: E/AndroidRuntime(2402): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-12 18:09:59.435: E/AndroidRuntime(2402): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
01-12 18:09:59.435: E/AndroidRuntime(2402): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
01-12 18:09:59.435: E/AndroidRuntime(2402): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
01-12 18:09:59.435: E/AndroidRuntime(2402): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
01-12 18:09:59.435: E/AndroidRuntime(2402): at android.os.Handler.dispatchMessage(Handler.java:99)
01-12 18:09:59.435: E/AndroidRuntime(2402): at android.os.Looper.loop(Looper.java:130)
01-12 18:09:59.435: E/AndroidRuntime(2402): at android.app.ActivityThread.main(ActivityThread.java:3701)
01-12 18:09:59.435: E/AndroidRuntime(2402): at java.lang.reflect.Method.invokeNative(Native Method)
01-12 18:09:59.435: E/AndroidRuntime(2402): at java.lang.reflect.Method.invoke(Method.java:507)
01-12 18:09:59.435: E/AndroidRuntime(2402): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
01-12 18:09:59.435: E/AndroidRuntime(2402): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
01-12 18:09:59.435: E/AndroidRuntime(2402): at dalvik.system.NativeStart.main(Native Method)
Upvotes: 0
Views: 338
Reputation: 4910
The error refers to smallestScreenWidthDp
which is something introduced in Android 3.2. You say that your phone is running Android 2.3.4 so you are calling some kind of code or configured something in your Manifest file that is causing the error.
Upvotes: 1