Implementing an option menu in Android Studio
<p>How do I implement an option menu in my android application? I tried code from <a href="http://developer.android.com/guide/topics/ui/menus.html" rel="noreferrer">Android Developer</a> but I get errors. Such as these: <strong>Element menu must be declared</strong>. Here is my code</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&gt;
&lt;item android:id="@+id/new_game"
    android:icon="@drawable/ic_new_game"
    android:title="@string/new_game"
    android:showAsAction="ifRoom"/&gt;
&lt;item android:id="@+id/help"
    android:icon="@drawable/ic_help"
    android:title="@string/help" /&gt;
&lt;/menu&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lucavanraalte.test" &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" android:screenOrientation="portrait"&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>

<p><a href="https://i.stack.imgur.com/BQ9QN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BQ9QN.png" alt="enter image description here"></a></p>