java - activity_main cannot be resolved or is not a field -


I am a new Android developer who read other threads while stuck in this error, I followed the instructions, but There is no way to solve this file in the race / layout / activity_main.xml:

  & lt; RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: device = "Http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = "Match_parent" & gt; & Lt; Button android: id = "@ + id / Button1" Android: layout_width = "300dp" Android: layout_height = "225dp" Android: layout_centerHorizontal = "true" Android: layout_centerVertical = "true" Android: textSize = "30sp" Android: TextColor = "# 613def" Android: TextStyle = "bold" Android: background = "@drawable / microphonegrey" /> & Lt; / RelativeLayout & gt;  

In Class MainActivity.java:.

  @Override public boolean onCreateOptionsMenu (Menu) {getMenuInflater () increased (R.menu.activity_main, menu); Back true; }  

can be "activity_main resolved or not the error is not an area"

I select 'Create menu' 'activity_main' field type

field went created, but then I see this message in the console:

  [2014-07-27 23:11:30 - as the test project] Arkxava manual Was modified from! Back in the Generated Version!  

Again and ..., cleaning the project, saving ... with the same result, the import section is correct in the file:

  import Mypackage.r, android. If it is in your res your code should look like this / layout folder:  

  @Override Public Zero onCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_main); }  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -