I added ProGuard to my Android project using default settings, and it broke my code.
On the first screen, I have a Button like this:
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="onSaveButtonClick" />
And I have a method in the Class:
public void onSaveButtonClick(View view){
// some code
}
When ProGuard disabled, everything works just fine. When enabled, on clicking the button I get this error:
05-17 16:04:54.099: E/AndroidRuntime(1181): java.lang.IllegalStateException: Could not find a method onSaveButtonClick(View) in the activity class xxxx for onClick handler on view class android.widget.Button with id 'xxxxx'
Any ideas why this happened?