I am struggling with resolving this resource error in xml
I have been struggling with this error for 2 days now and i am at wits end. building this project in eclipse.according to the sdk this png does not need to be imported. i imported into my drawables anyway after this error generated to no avail. is anybody willing to point me in the right direction here?
Error: No resource found that matches the given name (at 'icon' with value '@android.drawable/ic_menu_add'). W/ResourceType( 1020): Bad XML block: header size 62 or total size 9767704 is larger than data size 0
//*list_menu.xml
<?xml version="1.0" encod开发者_如何学编程ing="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_insert"
android:icon="@android.drawable/ic_menu_add"
android:title="@string/menu_insert"
/>
</menu>
//*strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, ReminderListActivity!</string>
<string name="app_name">Task Reminder</string>
<string name="no_reminders">No Reminders Yet</string>
<string name="title">Title</string>
<string name="body">Body</string>
<string name="date">Date</string>
<string name="time">Time</string>
<string name="confirm">Confirm</string>
<string name="menu_insert">Add Reminder</string>
</resources>
//*AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dummies.android.taskreminder"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<application android:icon="@drawable/icon"
android:label="@string/app_name" android:debuggable="true">
<activity android:name=".ReminderListActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ReminderEditActivity"
android:label="@string/app_name"/>
</application>
</manifest>
Try changing
android:icon="@android.drawable/ic_menu_add"
to
android:icon="@android:drawable/ic_menu_add"
I believe you need a : not a .
精彩评论