我正在努力解决 xml 中的此资源错误
我已经为这个错误苦苦挣扎了两天,现在我已经束手无策了。 在eclipse中构建这个项目。根据sdk,这个png不需要导入。在生成此错误后,我仍然导入到我的绘图中,但无济于事。 有人愿意在这里为我指出正确的方向吗?
错误:找不到与给定名称匹配的资源(在“icon”处,值为“@android.drawable/ic_menu_add”)。 W/ResourceType(1020):错误的 XML 块:标头大小 62 或总大小 9767704 大于数据大小 0
//*list_menu.xml
<?xml version="1.0" encoding="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>
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" encoding="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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试更改
为
I believe you need a : not a 。
Try changing
to
I believe you need a : not a .