Android | The following classes could not be found: menu and item
I'm trying to put a menu on my application, but when I put a menu tag in
my xml like this:
<menu
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<item
android:id="@+id/item1"
android:title="Item 1">
</item><item
android:id="@+id/item2"
android:title="Item 1">
</item>
<item
android:id="@+id/item3"
android:title="Item 1">
</item>
</menu>
I get this error message when I go on the graphical layout.
java.lang.ClassCastException
Exception details are logged in Window > Show View > Error Log
The following classes could not be found:
- item (Fix Build Path, Edit XML)
- menu (Fix Build Path, Edit XML)
Anyone know why?
No comments:
Post a Comment