title: Robolectric+Eclipse Can't find resources?
body: <p>I just configured a test project for my Android app to use Robolectric.
  I followed the <a href="http://pivotal.github.com/robolectric/eclipse-quick-start.html">Eclipse Quick Start</a>.
  An exception is raised executing my simple very first test.</p>
  
  <pre><code>java.lang.RuntimeException: java.lang.NullPointerException
      at com.xtremelabs.robolectric.res.ResourceLoader.init(ResourceLoader.java:93)
      at com.xtremelabs.robolectric.res.ResourceLoader.getStringValue(ResourceLoader.java:271)
      at com.xtremelabs.robolectric.shadows.ShadowResources.getString(ShadowResources.java:56)
      at android.content.res.Resources.getString(Resources.java)
      at org.xxx.mobile.android.teldir.app.TelephoneDirectoryTest.searchButtonLabelShouldBeGo(TelephoneDirectoryTest.java:22)
      [...]
  Caused by: java.lang.NullPointerException
      at com.xtremelabs.robolectric.res.StringResourceLoader.getValue(StringResourceLoader.java:17)
      at com.xtremelabs.robolectric.res.StringArrayResourceLoader.processNode(StringArrayResourceLoader.java:39)
      at com.xtremelabs.robolectric.res.XpathResourceXmlLoader.processResourceXml(XpathResourceXmlLoader.java:27)
      at com.xtremelabs.robolectric.res.DocumentLoader.loadResourceXmlFile(DocumentLoader.java:58)
      at com.xtremelabs.robolectric.res.DocumentLoader.loadResourceXmlDir(DocumentLoader.java:52)
      at com.xtremelabs.robolectric.res.DocumentLoader.loadResourceXmlDir(DocumentLoader.java:39)
      at com.xtremelabs.robolectric.res.ResourceLoader.loadValueResourcesFromDir(ResourceLoader.java:142)
      at com.xtremelabs.robolectric.res.ResourceLoader.loadValueResourcesFromDirs(ResourceLoader.java:136)
      at com.xtremelabs.robolectric.res.ResourceLoader.loadValueResources(ResourceLoader.java:109)
      at com.xtremelabs.robolectric.res.ResourceLoader.init(ResourceLoader.java:85)
      at com.xtremelabs.robolectric.res.ResourceLoader.getStringValue(ResourceLoader.java:271)
      at com.xtremelabs.robolectric.shadows.ShadowResources.getString(ShadowResources.java:56)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.xtremelabs.robolectric.bytecode.ShadowWrangler.methodInvoked(ShadowWrangler.java:87)
      at com.xtremelabs.robolectric.bytecode.RobolectricInternals.methodInvoked(RobolectricInternals.java:110)
      at android.content.res.Resources.getString(Resources.java)
      [...]
  </code></pre>
  
  <p>The test follows.</p>
  
  <pre><code>import static org.junit.Assert.assertEquals;
  
  import org.junit.Before;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  
  import com.xtremelabs.robolectric.RobolectricTestRunner;
  
  @RunWith(RobolectricTestRunner.class)
  public class TelephoneDirectoryTest {
      private TelephoneDirectory activity;
  
      @Before
      public void setUp() {
          activity = new TelephoneDirectory();
      }
  
      @Test
      public void searchButtonLabelShouldBeGo() throws Exception {
          String goLabel = activity.getResources().getString(R.string.search);
          assertEquals("Go", goLabel);
  
      }
  }
  </code></pre>
  
  <p>It seems it can't find Android <code>./res</code> folder. I pointed the JUnit configuration to <code>${workspace_loc:teldir-android}</code> as the guide says. And this makes Eclipse to find the <code>AndroidManifest.xml</code>, avoiding other errors, imho.</p>
  
  <p>Trying to avoid this exception I also added <code>./res</code> folder as source folder of my Android app, cleaned and relaunched all, but the same exception raised.</p>
  
  <p>What am I doing wrong?</p>