I am not a new developer to android. I have an application on the market. However, sometimes I get reported strange exceptions to have occured:
java.io.FileNotFoundException: res/drawable-mdpi/background.png
android.content.res.Resources$NotFoundException: File res/drawable-mdpi/background.png from drawable resource ID #0x7f02001f
This is by all means untrue because otherwise I wouldn;t have compiled or run the program myself. Also I am sure the resources are there. This is just one of the exception I have been reported. There are same exceptions for other resources mainly layouts.
So my question is how would this happen? Is it because the android system has failed installing correctly my app? I almost sure this must be the case because I have many users who use it without problem.
Please help regarding this.
There can be several possible reasons:
Moving application to SD card.
There was some problem in downloading or installing APK from market (file can be corrupted).
User get APK with corrupted file from other source (for example via bluetooth from other user)
Some system bug (from software, to brocken hardware)
Any way You can't do anything with this problem.
Could it be that the application was pushed to SD Card and something happens to the drawable while on SD. I saw similar issues with layouts rather drawable and it was because the application was pushed to SD.
Maybe you have included certain codes that reference content from Android SDK.
In my case, I faced similar issue and when I removed the line
android:background="?android:attr/actionBarItemBackground"
from my xml, everything works fine again.
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