The output bank is empty. Did you specify the correct "-keep" options?

I am trying to create an apk release file from ant and this is what I get 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 fix it. Using the latest SDK (API-17) with version 21.1 All java_home, Ant_home are installed

+6
source share
3 answers

Ohkk I myself got the answer. There was a problem in the manifest file in the jar project that I used as a library. Created a lib project, updated it, and referenced my main code. As in this LInk..and it worked :-) here

0
source

For library projects, I needed to add the -dontshrink parameter to the -dontshrink configuration file - proguard ALL my classes were abbreviated.

+19
source

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

Only inside the specified buildType define minifyEnabled false . Example:

 buildTypes { release { minifyEnabled false } } 
+2
source

All Articles