Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange R.java issue cause drawable resource isn't load correctly
    primarykey
    data
    text
    <p>I have some custom drawable but unfortunately a drawable doesn't load when I try to run the app on a device.</p> <ul> <li>I have tried to clean workspace... Same issue.</li> <li>I have tried to remove and re-import the project cleaning the .metadata folder... Same issue.</li> <li>I have tried to remove autogen file R.java... Nothing.</li> <li>I have tried to change the images used... Nothing.</li> <li>I have changed the name... Ops, this time the drawable with the problem start working BUT the same issue happens with another image.</li> </ul> <p>With various test I have noticed that the not-loaded image is always the first in </p> <pre><code>public static final class drawable {...} </code></pre> <p>inside the autogenerated file <code>R.java</code></p> <p>In detail, the resource image with the address 0x7f020000:</p> <pre><code>public static final int bt_a_1=0x7f020000; </code></pre> <p>these addresses are assigned alphabetically <strong>so I have solved simply adding another image named <code>a1.png</code> that is not used in the project.</strong></p> <p>With this workaround all works fine but I don't know what is the cause of this absurd issue.</p> <p><strong>EDIT</strong></p> <p>This is an Android Issue fixed since HoneyComb release in change Ia971bb242ceac5e8f9346094009a10f356399ab9</p> <p>The problem happens due to a low-level resource cache collision bug.</p> <p>More info at: <a href="https://android-review.googlesource.com/#/c/15815/" rel="nofollow">https://android-review.googlesource.com/#/c/15815/</a></p> <p>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.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload