-1

have no experience in Java.Get this error in "R." everywhere in Main_activity.java, when make a new Android project in Eclipse

       setContentView(R.layout.activity_main);

       if (id == R.id.action_settings)

Help appreciated.Thanks

ElGavilan
  • 6,610
  • 16
  • 27
  • 36
Orange
  • 1

2 Answers2

1

Check if the id action_setting is in your activity_main xml file. If it is but the error is still there. Go to Projects, try cleaning.

FireNewbie
  • 123
  • 2
  • 12
0

Normally this error happens when you have errors in your xml files (layouts/string/styles etc). Please make sure all the xml files are correct and build the project again.

P.S IMO Main_activity.java this name is not according to the standard Java naming conventions.As you are still a newbie to Java/Android I think you better start studying about those basic concepts. That will make your life more easier

virtualpathum
  • 753
  • 2
  • 11
  • 23