I’m trying to create an Android library JAR and would like to use ant for an automated build.
I noticed that when I use ant release, however, the jar file gets added an extra android/annotation folder with TargetApi.class and SuppressLint.class. This causes problems when I try to run an app with the jar, I get:
java.lang.IllegalArgumentException: already added: Landroid/annotation/SuppressLint;
How can I have ant not try to add these classes which appear redundant?
Specifically, the problem seems to be that ant is including annotations.jar in my lib, then when my other project imports that lib it encounters conflict with its own annotations.jar.
edit:Determined that this is ProGuard-related, as the original.jar it creates doesn’t have the annotations.jar classes, but obfuscated.jar does. Still not sure how to bypass this step.
In the ProGuard config, I have it only keep the files from my package name.