简体   繁体   中英

Enable Proguard on Android Library Project

I have a standalone Android Library Project and I would like to compile this project with Proguard enabled. I'm using Android Studio 1.0 and I have enabled Proguard with minifyEnabled true. However after a clean build I get the following error

Error:Execution failed for task ':test_sdk:proguardRelease'.
> java.io.IOException: The output jar is empty. Did you specify the proper '-keep' options?

Any idea on what I'm doing wrong ?

I added the following proguard rules

-keep public class * {
    public *;
}

-keepclassmembers class * {
    public *;
}

-keepattributes Exceptions,InnerClasses

It seems to work now

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM