Errors:

+1 Priyanka Dash · January 29, 2016
Hi,

I am getting error in OverFlow Menu design. In my MainActivity.java file its showing error  in  method onOptionItemSelected(),
RelativeLayout main_view = (RelativeLayout)findViewById(R.id.main_view);

Here R.id.main_view is the error (main_view cant be resoved or not a field)

All the cases are also error:
 case R.id.menu_red:
case R.id.menu_blue: (cant be resolved or not a field)

In main.xml also   error:

android:id="@id/menu_red" (No resources found that matches the given name).

For rest all id there is no error. 

Plz help...

Post a Reply

Replies

Oldest  Newest  Rating
0 Gary Whitney · February 2, 2016
your missing the + sign to ADD it to the Resources.
 android:id="@+id/menu_red"
  • 1

Java / Android Development

106,913 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator