title: Eclipse Graphical Layout does not load images
body: <p>I created a custom class that extends View, and put some custom drawing routines into it.  When the class initializes, it creates a Bitmap using:</p>
  
  <pre><code>Bitmap template = BitmapFactory.decodeResource(getResources(), R.drawable.template);
  </code></pre>
  
  <p>This works fine when I run the application both in the AVD, and on a native device, but in Eclipse, I get a null-reference exception any time I try to call </p>
  
  <pre><code>canvas.drawBitmap(template, srcRect, destRect, null);
  </code></pre>
  
  <p>if I wrap the drawBitmap statement in an if-check for template == null, then the graphical layout shows, and the view is blank on screen (which is to be expected if I am not drawing the background).</p>
  
  <p>I started noticing a while ago, that when I added and removed images to my "drawable-hdpi" directory, that the images in the graphical editor were starting to get corrupted.  Recently, I just cleared out all the old test graphics I was using, so the only images in the drawable-hdpi directory are "ic_launcher.png" and "template.png"</p>
  
  <p>Does anyone know how I can reset Eclipse so that it will start reading the graphics properly again?</p>