title: Android Developers MyFirstApp - "menu cannot be resolved or is not a field"
body: <p>I am attempting to build my first app using the <a href="http://developer.android.com/training/basics/firstapp/building-ui.html">tutorial provided by android</a> in Eclipse.</p>
  
  <p>I've done everything is says but i get the error message..."menu cannot be resolved or is not a field". The tutorial doesn't mention anything about a menu and i'm sure i haven't done anything to it. The line it is complaining about i've marked in a comment.</p>
  
  <pre><code>package com.example.my.first.app;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  
  public class MainActivity extends Activity {
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.activity_main, menu);        &lt;!--this line--&gt;
      return true;
  }
  }
  </code></pre>
  
  <p>This is the main activity page the tutorial has asked me to edit is shown below...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="horizontal"&gt;
  &lt;EditText android:id="@+id/edit_message"
      android:layout_weight="1"
      android:layout_width="0dp"
      android:layout_height="wrap_content"
      android:hint="@string/edit_message" /&gt;
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/button_send" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Going off advice i've found on other questions i've attempted clicking on it and to include what ever it's asking for which is "Create field 'menu' in type 'R' or "Create constant 'menu' in type 'R'. I've done both separately and every time i save the project so it rebuilds, it automatically deletes the line that was included.</p>
  
  <p>For the field, this was done. - public static Object menu;
  For the constant, this was done. - public static final String menu = null;</p>
  
  <p>So i'm now a little stuck and would like some much needed help please. </p>