I'm starting to see an odd set of stack traces from the marketplace crash reports interface. I'm being told a drawable resource does not exist. The xml in question:
<ImageView
android:layout_width="13dip"
android:layout_height="12dip"
android:src="@drawable/foo"
/>
causing:
java.lang.RuntimeException:
Unable to start activity ComponentInfo{com.me.app/com.me.app.MyActivity}:
android.view.InflateException: Binary XML file line #51:
Error inflating class <unknown>
...
Caused by: android.content.res.Resources$NotFoundException:
File res/drawable-hdpi/foo.png from drawable resource ID #0x7f020166
at android.content.res.Resources.loadDrawable(Resources.java:1732)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.widget.ImageView.<init>(ImageView.java:118)
at android.widget.ImageView.<init>(ImageView.java:108)
Caused by: java.io.FileNotFoundException:
res/drawable-hdpi/foo.png
at android.content.res.AssetManager.openNonAssetNative(Native Method)
at android.content.res.AssetManager.openNonAsset(AssetManager.java:417)
at android.content.res.Resources.loadDrawable(Resources.java:1724)
Now "foo.png" exists in both my "drawable" and "drawable-hdpi" folders. I haven't touched either of these drawables in ages - not sure why this error started popping up? Happening on a range of devices, Droids, Nexus Ones, etc.
Thanks
Try by placing foo.png in other drawable folder i.e. mdpi, xhdpi and xxhdpi also. May be it can help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With