Im creating an android app which uses a menu.xml file in the res folder. But I'm getting the above error. What does it mean? How can I fix it?
menu.xml:
<?xml version="1.0" encoding= "utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item id="@+id/my_location"
android:icon="@drawable/my_location"
android:title:="Current location" />
<item id="@+id/mapview_satellite"
android:icon="@drawable/satelliteview"
android:title="Satellite View" />
<item id="@+id/mapview_normal"
android:icon="@drawable/normalview"
android:title="Normal view" />
</menu>
Change <item id="@+id/my_location"
to <item android:id="@+id/my_location"
. This in all three places.
Also, in here: android:title:="Current location"
remove the colon after title
.
You also need to make sure the following two lines are in your attributes list:
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
If you omit those, Eclipse will just give you the "missing android prefix" error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With