title: Android Studio: Adding Action Bar Item with "onClick" encounters "FATAL EXCEPTION"
body: <p>So I'm starting to work on my first Android App and I've already hit a wall. I want to start off with a "Create" button at the action menu at the top that has the ability to create new contacts. But then I hit some sort of error I can't understand and it's been hindering my process.</p>
  
  <p>The error started when I added the "onClick" line tot he action item and since then, stopped running on my emulator. </p>
  
  <p>Thank you.</p>
  
  <p>MainActivity.java</p>
  
  <pre><code>package com.xephos.detra;
  
  import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.TextView;
  
  
  public class MainActivity extends ActionBarActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.menu_main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  
  public void create(View v){
      TextView tv = (TextView) findViewById(R.id.test);
      tv.setText("Working!");
  }
  }
  </code></pre>
  
  <p>This might help: the menu_main.xml.</p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity"&gt;
  &lt;item android:id="@+id/action_settings" android:title="@string/action_settings"
      android:orderInCategory="100" app:showAsAction="never" /&gt;
  
  &lt;item
      android:id="@+id/add"
      android:title="Add New Contact"
      app:showAsAction ="always"
      android:icon="@drawable/ic_add_white_48dp"
      android:onClick="create"/&gt;
  &lt;/menu&gt;
  </code></pre>
  
  <p>And finally, the error:</p>
  
  <pre><code>20653-20653/com.xephos.detra E/AndroidRuntime﹕ FATAL EXCEPTION: main
  Process: com.xephos.detra, PID: 20653
  android.view.InflateException: Couldn't resolve menu item onClick handler create in class com.xephos.detra.MainActivity
          at android.support.v7.internal.view.SupportMenuInflater$InflatedOnMenuItemClickListener.&lt;init&gt;(SupportMenuInflater.java:242)
          at android.support.v7.internal.view.SupportMenuInflater$MenuState.setItem(SupportMenuInflater.java:443)
          at android.support.v7.internal.view.SupportMenuInflater$MenuState.addItem(SupportMenuInflater.java:479)
          at android.support.v7.internal.view.SupportMenuInflater.parseMenu(SupportMenuInflater.java:196)
          at android.support.v7.internal.view.SupportMenuInflater.inflate(SupportMenuInflater.java:118)
          at com.xephos.detra.MainActivity.onCreateOptionsMenu(MainActivity.java:22)
          at android.app.Activity.onCreatePanelMenu(Activity.java:2823)
          at android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:277)
          at android.support.v7.internal.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:84)
          at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.onCreatePanelMenu(AppCompatDelegateImplBase.java:275)
          at android.support.v7.app.AppCompatDelegateImplV7.preparePanel(AppCompatDelegateImplV7.java:1117)
          at android.support.v7.app.AppCompatDelegateImplV7.doInvalidatePanelMenu(AppCompatDelegateImplV7.java:1399)
          at android.support.v7.app.AppCompatDelegateImplV7.access$100(AppCompatDelegateImplV7.java:89)
          at android.support.v7.app.AppCompatDelegateImplV7$1.run(AppCompatDelegateImplV7.java:126)
          at android.os.Handler.handleCallback(Handler.java:739)
          at android.os.Handler.dispatchMessage(Handler.java:95)
          at android.os.Looper.loop(Looper.java:135)
          at android.app.ActivityThread.main(ActivityThread.java:5257)
          at java.lang.reflect.Method.invoke(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:372)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
   Caused by: java.lang.NoSuchMethodException: create [interface android.view.MenuItem]
          at java.lang.Class.getMethod(Class.java:664)
          at java.lang.Class.getMethod(Class.java:643)
          at android.support.v7.internal.view.SupportMenuInflater$InflatedOnMenuItemClickListener.&lt;init&gt;(SupportMenuInflater.java:240) ...
  </code></pre>
  
  <p>                </p>