title: onClick method does not exist
body: <p>(!)<code>onClick</code> method does not exist </p>
  
  <blockquote>
    <p>Corresponding method handler 'public void navigate(android.view.View)' not found  The onClick attribute value should be the name of a method in this View's context to invoke when the view is clicked. This name must correspond to a public method that takes exactly one parameter of type View.  Must be a string value, using '\;' to escape characters such as '\n' or '\uxxxx' for a unicode character.</p>
  </blockquote>
  
  <p>*
  Hello I am new here, I am simply trying courses on Coursera but it seems like it's pretty outdated, and some things are not working properly as it is supposed to. 
  I have been trying to search here on the forums to find an answer, and I have tried a couple of things, but it seems like I am too retarded and a newbie.
  Could it be something to do with my tools:context?</p>
  
  <p><strong>Heres my xml:</strong></p>
  
  <pre><code>&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:padding="16dp"
  tools:context="MainActivity"
  android:background="#ffffff"&gt;
  
  
  &lt;NumberPicker
      android:id="@+id/numberPicker"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      /&gt;
  
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="OK"
      android:id="@+id/button"
      android:layout_below="@+id/numberPicker"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:onClick="navigate"/&gt;
  
  &lt;WebView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/webView"
      android:layout_below="@+id/button"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true" /&gt;
  </code></pre>
  
  <p><strong>Heres my java:</strong></p>
  
  <pre><code>import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  import android.widget.NumberPicker;
  import android.view.View;
  
  public class MainActivity extends AppCompatActivity {
  
  NumberPicker possibilities;
  WebView webView;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      possibilities = (NumberPicker) findViewById(R.id.numberPicker);
      webView = (WebView) findViewById(R.id.webView);
      String[] possibilitiesStrings = {
              "Android",
              "Checklist text-input fields",
              "Coursera",
              "Supelec",
      };
      possibilities.setDisplayedValues(possibilitiesStrings);
      possibilities.setMinValue(0);
      possibilities.setMaxValue(possibilitiesStrings.length - 1);
  
      /**
       * called when the OK button from activity_main.xml is clicked
       * @param v the View which triggered the method call: the OK button
       */
      public void navigate(View v) {
      int choice = possibilities.getValue();
          webView.setWebViewClient(new WebViewClient());
      if (choice == 0)
          webView.loadUrl("file:///android_asset/android.html");
      else if (choice == 1)
      webView.loadUrl("file:///android_asset/checklist.html");
  else if (choice == 2)
      webView.loadUrl("http:///www.coursera.org");
  else if (choice == 3)
      webView.loadUrl("file:///android_asset/supelec.html");
  }
  
  }
  
  
  }
  }
  </code></pre>