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 : Cannot resolve symbol "loginClick". 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 ?
<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"
...
/>
<TextView
    android:text="No account ?"
    android:id="@+id/singin_signup_tv"
    android:clickable="true"
    android:onClick="switchToSignUp"
    ...
 />
here is how I have defined the onClick listeners :
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<String , Void , String>(){
        protected String doInBackground(String... params) {/*...*/  }
    }.execute("");
}
