title: Cannot resolve symbol 'menu'
body: <p><a href="https://i.stack.imgur.com/IHpRQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IHpRQ.png" alt="MainActivity.java"></a></p>
  
  <blockquote>
    <p>This activity_main.java</p>
  </blockquote>
  
  <h1>Main javaActity file</h1>
  
  <p><em>imported packages and libraries</em></p>
  
  <pre><code>//Package for project 
  package com.example.legend.myapplication;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  
  //Main activity main class extending Activity class
  
  public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      //Menu class
  
      @Override
      public boolean onCreateOptionMenu(Menu menu){
          getMenuInflater().inflate(R.menu.menu_main, menu);//Can't resolve  menu symbol
          return true;
      }
  }
  </code></pre>
  
  <blockquote>
    <p>Manifest.xml file</p>
  </blockquote>
  
  <h1>AndroidManifest.xml File</h1>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.legend.myapplication"&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"&gt;
      &lt;activity android:name=".MainActivity"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <blockquote>
    <p>String.xml file</p>
    
    <h2>String Content file for app</h2>
  </blockquote>
  
  <pre><code>&lt;resources&gt;
      &lt;string name="app_name"&gt;XXXXXXXXXX&lt;/string&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <blockquote>
    <p>activity_main.xml</p>
    
    <h1>Activity_Main.xml</h1>
  </blockquote>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  android:background="#da006699"
  tools:context="com.example.legend.myapplication.MainActivity"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textAppearance="?android:attr/textAppearanceLarge"
          android:text="XXXXXXXXX"
          android:textColor="#ffffff"
          android:id="@+id/textView"
          android:layout_centerVertical="true"
          android:layout_centerHorizontal="true" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>