Prevent Proguard to remove specific drawables
I had a similar issue and wanted to add just a few bits.
The resources ARE NOT stripped away by ProGuard. If you simply unzip your apk you will see that the image files are still there.
The problem is that the Webkit FileLoader will try and load your R$drawable class using reflection. If you do not add any keep rule to your proguard.cfg file that class will be renamed, hence Webkit will not be able to load your resource.
By placing the file into the assets folder your are bypassing the R class system and everything will work.
This is not a solution though if, for example, you want to use different resources for different densities.
I suggest you simply add a very basic keep rule to preserve R inner classes and fields:
-keepclassmembers class **.R$* {
public static <fields>;
}
-keep class **.R$*
I moved the images to the 'assets' folder which solved my problem:
<img src="file:///android_asset/myfriend.png">