Dynamic loading of images R.Drawable using variable
<p>I think i'm getting closer but still getting resource errors with this. I have an image file named rock.png in all 3 drawable folders. </p>

<p>in my layout MAIN.XML:</p>

<pre><code> &lt;ImageView android:id="@+id/rockId" android:src="@drawable/rock"&gt;&lt;/ImageView&gt;
</code></pre>

<p>In my code:</p>

<pre><code>            int resID = getResources().getIdentifier("rockId" , "id", "com.testing");
            ImageView image = (ImageView) findViewById(resID);
</code></pre>

<p>I'm still seeing this in my error catlog:</p>

<pre><code>10-30 17:36:24.485: WARN/ResourceType(74): Resources don't contain package for resource number 0x7f020000
</code></pre>

<p>Any thoughts on what I might be doing wrong? Any tips welcome</p>
