title: xml onClicks no longer work for activity in android lollipop
body: <p>The company I work for has an app which I've been working on for a while and been running on Android 4.4 perfectly fine. After one of our Nexus 5 got the lollipop update, suddenly all onClicks no longer work. I've tried running our app on other devices and in a vm and the same issue occurs. I can only show so much for proprietary code reasons but that shouldn't be an issue.</p>
  
  <p>The first Activity with an onClick is the LoginActivity which extends Activity and doesn't touch fragments or dialogs (which are what all other results with similar problems cited as the problem). The example below is from a button that is supposed to let you choose your server:</p>
  
  <pre><code>public class LoginActivity extends Activity{
  ...
      public void btnLoginServer_clicked(View v){
          Intent serversIntent = new Intent(LoginActivity.this,ServersActivity.class);
          startActivity(serversIntent);
      }
  ...
  }
  </code></pre>
  
  <p>The stack trace says:</p>
  
  <pre><code>E/AndroidRuntime﹕ FATAL EXCEPTION: main
      Process: com.company.app, PID: 2241
      java.lang.IllegalStateException: Could not find a method btnLoginServer_clicked(View) in the activity class android.view.ContextThemeWrapper for onClick handler on view class android.widget.Button with id 'btnLoginServer'
              at android.view.View$1.onClick(View.java:3994)
              at android.view.View.performClick(View.java:4756)
              at android.view.View$PerformClick.run(View.java:19749)
              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:5221)
              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:899)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
       Caused by: java.lang.NoSuchMethodException: btnLoginServer_clicked [class android.view.View]
              at java.lang.Class.getMethod(Class.java:664)
              at java.lang.Class.getMethod(Class.java:643)
              at android.view.View$1.onClick(View.java:3987)
              at android.view.View.performClick(View.java:4756)
              at android.view.View$PerformClick.run(View.java:19749)
              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:5221)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:372)
  </code></pre>
  
  <p>And for good measure here's the xml of the button.</p>
  
  <pre><code>&lt;Button
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/btnLoginServerNoServer"
          android:id="@+id/btnLoginServer"
          android:singleLine="true"
          android:textColor="#de1bd500"
          android:onClick="btnLoginServer_clicked"
          android:background="@drawable/app_button_server_background" /&gt;
  </code></pre>
  
  <p>For a little extra clarification, the app was installed on two devices with android 4.4, they were upgraded to 5.0 and this problem began occurring. The app was removed and reinstalled, same problem. The app has been freshly installed on three other devices that had 5.0 but never had the app before, same problem. Same thing with a few different VMs.</p>
  
  <p>Please help me. I don't have much hair left to pull out and I'm concerned I may throw something expensive at a wall.</p>