Weird error that only pops up when running the Proguard step from Android Studio
The error:
org.gradle.internal.UncheckedException: proguard.ParseException: Expecting keyword 'allowshrinking', 'allowoptimization', or 'allowobfuscation' before 'includedescriptorclasses' in line 42 of file...
Here is the line in question in my Proguard file:
-keep, includedescriptorclasses public class com.Foo.Bar {
public protected <fields>;
public protected <methods>;
public protected *;
}
Noting that:
-keep,allowobfuscations, allowoptimizations, allowshrinking, includedescriptorclasses public class com.Foo.Bar {
public protected <fields>;
public protected <methods>;
public protected *;
}
Or any combination of keep modifiers still results in the same error message.
The option includedescriptorclasses
is new in ProGuard 5.0. You are probably using an older version. The versions are all backward compatible, so you can just change the ProGuard jar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With