no resource found that matches the given name

sam picture sam · Jan 19, 2011 · Viewed 94.7k times · Source

This:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="de.androidbuch.rechner"
  android:versionCode="1"
  android:versionName="1.0">

  <uses-sdk android:minSdkVersion="7"></uses-sdk>
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:theme="@android:style/Theme.Light">

    <activity android:name=".FormularActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

is my AndroidManifest.xml and in lines 8 & 11 I get the error:

no resource found that matches the given name(at "label" with value "@string/app_name")

no resource found that matches the given name(at "label" with value "@string/app_name")

This is really strange and I did not move the values Folder anywhere.

Answer

Jerry Brady picture Jerry Brady · Jan 19, 2011

Did you check to ensure that you have the string resource defined in res/values/strings.xml?

<string name="app_name">"My App"</string>

Sometimes, I've noticed eclipse will also throw errors that are hard to track if you have any .xml files with errors. I don't think the parser recovers well and sometimes the errors you get can be misleading.