Search code examples
androidactionbarsherlockapkproguard

Android Action Bar Sherlock Illegal Argument Exception after running Proguard


I have just used Proguard for the first time (ever), and having copied the exported APK back into my emulator,

I received an

ILLEGAL ARGUMENT EXCEPTION : class a is not annotated with @Implementation at com.actionbarsherlock.a.a(Unknown source)

As Proguard appears to have saved me around 400KB, I am keen to use it if possible. Can anybody suggest a good approach here - I don't want to exclude the ABS .jar - my project has grown significantly since starting to use ABS.


Solution

  • Did you add the proguard lines from the ABS website?

    -keep class android.support.v4.app.** { *; }
    -keep interface android.support.v4.app.** { *; }
    -keep class com.actionbarsherlock.** { *; }
    -keep interface com.actionbarsherlock.** { *; }
    
    -keepattributes *Annotation*
    

    See http://actionbarsherlock.com/faq.html