Since today, something weird is happening with my application. Every time I click a button that has set the android:onClick attribute, I get an IllegalStateException: Co
You need to tell proguard not to mutate the method associated with your android:onClick
tag.
Here is an example rule (taken from the proguard website):
-keep class mypackage.MyCallbackClass {
void myCallbackMethod(java.lang.String);
}
in the example file in the android framework tools (YOUR_ANDROID_DIR/tools/proguard/proguard-android.txt), you can find the following rule:
# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
With the comment it's quite explicit.