title: Android Studio Button onClick : Cannot resolve symbol
body: <p>I am experiencing some really wired things lately with Android Studio, In my Login fragment xml I have defined a Button and a TextView. Both the button and the textView are suppose to be clickable. However only the switchToSignUp method is resolvable in the xml file. when I try to assign onClick listenr for the Button I get a warning that says : <code>Cannot resolve symbol "loginClick"</code>. The code compiles fine even if the warning exists however when I click the Button nothing happens. Am I missing something obvious or could it be a bug of the Android Studio ?</p>
  
  <pre><code>&lt;Button
      android:text="login"
      android:onClick="loginClick"
      android:id="@+id/loginBtn"
      style="@android:style/Widget.Holo.Button.Borderless"
      android:background="@android:color/holo_red_light"
  ...
  /&gt;
  &lt;TextView
      android:text="No account ?"
      android:id="@+id/singin_signup_tv"
      android:clickable="true"
      android:onClick="switchToSignUp"
      ...
   /&gt;
  </code></pre>
  
  <p>here is how I have defined the onClick listeners : </p>
  
  <pre><code>public void switchToSignUp(View view){
      Log.i(TAG,"switch to sign up ");
      switchView();
  }
  
  public void loginClick(View view){
      Log.i(TAG,"login clicked");
      new AsyncTask&lt;String , Void , String&gt;(){
          protected String doInBackground(String... params) {/*...*/  }
      }.execute("");
  }
  </code></pre>