Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error using eclipse for Android - No resource found that matches the given name

Tags:

Common problem I'm sure, but I can't figure it out. In my AndroidManifest.xml and main.xml I'm getting the no resource found that matches the given name. I've double checked for typos and it used to work, but now I'm popping up with all these errors saying it can't find my strings in my strings.xml.

These are the ones I'm getting errors for in my main.xml.

    <TextView     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:layout_marginTop="10dip"     android:text="@string/instructions"    />      <TextView     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:layout_marginTop="10dip"     android:text="@string/level_prompt"    />      <Spinner              android:id="@+id/spinner"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:prompt="@string/level_array"    /> 

These are the ones I'm getting for my androidmanifest.xml.

<application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".HelloFormStuff" android:label="@string/title"> 

This is what my strings.xml looks like.

<string name="title">Title</string> <string name="app_name">Application name</string>  <string name="instructions">Enter instructions here.</string>  <string name="level_prompt">Choose an item</string>  <string-array name="level_array">         <item>Item One</item>         <item>Item Two</item>         <item>Item Three</item>         <item>Item Four</item> </string-array> 

Any ideas? Any help would be appreciated!!

like image 429
KennyH Avatar asked Mar 19 '10 13:03

KennyH


2 Answers

Accidentally moved the "values" folder outside of the "res" folder. Moved it back and it fired up!

like image 105
KennyH Avatar answered Oct 02 '22 23:10

KennyH


This problem appeared for me due to an error in an XML layout file. By changing @id/meid to @+id/meid (note the plus), I got it to work. If not, sometimes you just gotta go to Project -> Clean...

like image 38
Stephen Wylie Avatar answered Oct 02 '22 23:10

Stephen Wylie