I have some custom drawable but unfortunately a drawable doesn't load when I try to run the app on a device.
With various test I have noticed that the not-loaded image is always the first in
public static final class drawable {...}
inside the autogenerated file R.java
In detail, the resource image with the address 0x7f020000:
public static final int bt_a_1=0x7f020000;
these addresses are assigned alphabetically
so I have solved simply adding another image named a1.png
that is not used in the project.
With this workaround all works fine but I don't know what is the cause of this absurd issue.
EDIT
This is an Android Issue fixed since HoneyComb release in change Ia971bb242ceac5e8f9346094009a10f356399ab9
The problem happens due to a low-level resource cache collision bug.
More info at: https://android-review.googlesource.com/#/c/15815/
This problem can happens in all device with OS older than HoneyComb... to avoid the bug in these device, use same strategy that I have described.
That is a known issue, I guess it's solved in Honeycomb.
http://code.google.com/p/android/issues/detail?id=20283
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