I am getting the following error while obfuscating my application.
How can i define the output jar in my build.xml?
[java] Shrinking...
[java] java.io.IOException: The output jar is empty. Did you specify the proper '-keep' options?
[java] at proguard.shrink.Shrinker.execute(Shrinker.java:148)
[java] at proguard.ProGuard.shrink(ProGuard.java:294)
[java] at proguard.ProGuard.execute(ProGuard.java:100)
[java] at proguard.ProGuard.main(ProGuard.java:499)
The tutorial here has never gone wrong for me.
- Use Android SDK Tools revision 8 or later
- If you do not have build.xml for your project, run command like this in some empty directory
android create project --name <Your Project Name> --package <Your Company Name> --target 7 --path . --activity dummy
Find build.xml which you can copy to root directory of the project.
- In default.properties add reference to proguard settings (proguard.config=proguard.cfg)
- Turn off android:debuggable in application manifest.
- Run 'ant release' command
You should find directory called ./bin/proguard and ./bin/-release.apk. You can find more details here.