Android 2.2 SDK breaks compatibility with older phones
- by Tom
I have recently updated my app to a build tarket of SDK version 8 in order to include the App2SD feature for my users.
However I have had reports of devices on SDK 3 (1.5) having problems starting the application, with the following stack trace:
...
E/AndroidRuntime(10638): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/title_bar_shadow.9.png from drawable resource ID #0x7f020000
E/AndroidRuntime(10638): at android.content.res.Resources.loadDrawable(Resources.java:1641)
E/AndroidRuntime(10638): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
E/AndroidRuntime(10638): at android.view.View.<init>(View.java:1726)
E/AndroidRuntime(10638): at android.view.View.<init>(View.java:1675)
E/AndroidRuntime(10638): at android.view.ViewGroup.<init>(ViewGroup.java:271)
E/AndroidRuntime(10638): at android.widget.LinearLayout.<init>(LinearLayout.java:92)
E/AndroidRuntime(10638): ... 26 more
E/AndroidRuntime(10638): Caused by: java.io.FileNotFoundException: res/drawable/title_bar_shadow.9.png
E/AndroidRuntime(10638): at android.content.res.AssetManager.openNonAssetNative(Native Method)
E/AndroidRuntime(10638): at android.content.res.AssetManager.openNonAsset(AssetManager.java:392)
E/AndroidRuntime(10638): at android.content.res.Resources.loadDrawable(Resources.java:1634)
E/AndroidRuntime(10638): ... 31 more
If i change the build target back to version 4 as it was previously this issue goes away, also if i remove any graphical resources from my XML files this issue goes away!
Any help would be much appreciated as i currently have a broken app on the market for many users.