Question: I have created `menu` folder in `res`. Inside the `menu` folder I created a **menu\_main.xml** file which contains: 

```
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
    <item android:id="@+id/action_settings" android:title="action_settings"
            android:orderInCategory="100" android:showAsAction="never" />
</menu>

```

Since I'm using this **xml** in conjunction with a code inside `MainActivity`. It gives me an error of "Cannot resolve symbol for `menu_main`. Below is the snippet:

```
@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

```

I cannot understand why this is happening even after creating the xml in a specified folder. Maybe I'm missing something silly but I can't get a hold of it. Any help would be appreciated.

Answer: 
Clean and rebuild your project by going to `Build>Clean` Project.
Go to `File>Invalidate Caches/Restart`.
`android:showAsAction="always"` here you go.! try to follow Proper Android Developer Documentation [Menus](https://developer.android.com/guide/topics/ui/menus.html) 
and this Tutorial Will help you too.! [Menu Example](http://www.javatpoint.com/android-option-menu-example) And Last go to file click on Invalidate Caches and Restart.! hope this will help u.!

```
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
    <item android:id="@+id/action_settings" android:title="action_settings"
            android:orderInCategory="100" android:showAsAction="always" />
</menu>

```