No resource found that matches the given name Eclipse Android xml file

No resource found that matches the given name – error examples.
Exist resource file?
Is code written correctly?

// No resource found that matches the given name (at id with value @id/myButton).
 android:id="@id/myButton" // invalid id notation
 android:id="@+id/myButton" // correct
 
 
 // No resource found that matches the given name 
// (at icon with value @drawable/icons).
// exist file icons in res/drawable folder?
<application android:icon="@drawable/icons" 
 
//No resource found that matches the given name 
//(at theme with value @style/MyThem).
<activity android:name=".Main"
                  android:label="@string/app_name"
                  android:theme="@style/MyThem">
 
// Exist style MyThem  in styles.xml ?  No only MyTheme
<style name="MyTheme" parent="android:Theme">
        <item name="android:windowTitleSize">50px</item>
</style>
 
 
 
// exist file my_background in folder drawable ?
android:background="@drawable/my_background" // 
 
// no resource found that matches the given name(at "label" with value "@string/app_name")
// have you the string resource defined in res/values/strings.xml ?
<string name="app_name">"My App"</string>
This entry was posted in Android Examples Code, Eclipse and tagged , , , . Bookmark the permalink.


Comments are closed.



7,826 views