-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
Here's a snip of the logcat output:
E/AndroidRuntime( 7423): Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: <init> [class android.app.Activity, int]
E/AndroidRuntime( 7423): at com.actionbarsherlock.a.a(ActionBarSherlock.java:232)
E/AndroidRuntime( 7423): at com.actionbarsherlock.a.g.f(SherlockFragmentActivity.java:32)
E/AndroidRuntime( 7423): at com.actionbarsherlock.a.g.g(SherlockFragmentActivity.java:43)
From ActionBarSherlock.java:
private static final Class<?>[] CONSTRUCTOR_ARGS = new Class[] { Activity.class, int.class };
...
try {
Constructor<? extends ActionBarSherlock> ctor = impl.getConstructor(CONSTRUCTOR_ARGS);
return ctor.newInstance(activity, flags);
} catch (NoSuchMethodException e) {
throw new RuntimeException(e);
}
Based on what getConstructor does I'd expect I need to inform proguard to not obfuscate an class ctor that takes Activity.class and int.class as parameters.
That is correct. There is a single constructor on the two implementations of the ActionBarSherlock.java interface which are required.
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
Sorry, user error... my build was using a different config file. The recommended values on the website work fine.