Issue
From menu:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:appcompat="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_item_new"
android:title="@string/menu_item_new"
appcompat:showAsAction="always"></item>
<item
android:id="@+id/menu_item_save"
android:title="@string/menu_item_save"
appcompat:showAsAction="always"></item>
<item
android:id="@+id/menu_item_delete"
android:title="@string/menu_item_delete"
appcompat:showAsAction="always"></item>
<item
android:id="@+id/menu_item_rate"
android:title="@string/menu_item_rate"></item>
<item
android:id="@+id/menu_item_website"
android:title="@string/menu_item_website"></item>
<item
android:id="@+id/menu_item_report"
android:title="@string/menu_item_report"></item>
</menu>
Even though all those strings do in fact exist:
<string name="menu_item_new">New</string>
<string name="menu_item_save">Save</string>
<string name="menu_item_delete">Cancel</string>
<string name="menu_item_rate">Rate on Google Play</string>
<string name="menu_item_website">Website</string>
<string name="menu_item_report">Report a Bug</string>
I have attempted to simply re-write the code as well as clean and rebuild, yet the error persists.
How can this be resolved?
Solution
resources
tag is missing from strings.xml
file.
Android couldn't locate the string
resource.
Make following changes:
<resources>
<string name="menu_item_new">New</string>
<string name="menu_item_save">Save</string>
<string name="menu_item_delete">Cancel</string>
<string name="menu_item_rate">Rate on Google Play</string>
<string name="menu_item_website">Website</string>
<string name="menu_item_report">Report a Bug</string>
</resources>
Answered By - seahawk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.