Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The output jar is empty. Did you specify the proper '-keep' options?

I am trying to build a release APK file from ant and this is what i m getting in my console

D:\AndroidSDK\android-sdk_r18-windows\android-sdk-windows\tools\ant\build.xml:595: The following error occurred while executing this line:D:\AndroidSDK\android-sdk_r18windows\android-sdk-windows\tools\ant\build.xml:864: The output jar is empty. Did you specify the proper '-keep' options?

What is this error and how can i resolve it..M using the latest SDK(API-17) with Revision 21.1 All java_home,Ant_home are set

like image 770
sheetal Avatar asked Feb 14 '13 06:02

sheetal


2 Answers

For library projects, I needed to add -dontshrink option to proguard config file - proguard was shrinking ALL my classes.

like image 84
Fenix Voltres Avatar answered Oct 12 '22 23:10

Fenix Voltres


When using gradle build system, there is no need to modify proguard-rules.pro.

Just inside specified buildType define minifyEnabled false. Example:

buildTypes {
    release {
        minifyEnabled false
    }
}
like image 28
R. Zagórski Avatar answered Oct 12 '22 22:10

R. Zagórski