I have a project that builds ok in Eclipse, but throws a ZipException when executing "ant debug". The conclusion is as follows: (excluded paths and project name)
-dex: [dex] Converting compiled files and external libraries into /home/.../Android/[folder]/bin/classes.dex... [dx] [dx] UNEXPECTED TOP-LEVEL EXCEPTION: [dx] java.util.zip.ZipException: error in opening zip file [dx] at java.util.zip.ZipFile.open(Native Method) [dx] at java.util.zip.ZipFile.<init>(ZipFile.java:131) [dx] at java.util.zip.ZipFile.<init>(ZipFile.java:148) [dx] at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:206) [dx] at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131) [dx] at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109) [dx] at com.android.dx.command.dexer.Main.processOne(Main.java:418) [dx] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329) [dx] at com.android.dx.command.dexer.Main.run(Main.java:206) [dx] at com.android.dx.command.dexer.Main.main(Main.java:174) [dx] at com.android.dx.command.Main.main(Main.java:95) [dx] 1 error; aborting BUILD FAILED /home/.../android-sdk-linux_x86/tools/ant/build.xml:818: The following error occurred while executing this line: /home/.../android-sdk-linux_x86/tools/ant/build.xml:820: The following error occurred while executing this line: /home/.../android-sdk-linux_x86/tools/ant/build.xml:832: The following error occurred while executing this line: /home/.../android-sdk-linux_x86/tools/ant/build.xml:278: null returned: 1
This project refers to a library project that refers to another library project. So
Project A → Project B → Project C
For me, the weird part is that installing from eclipse works fine, but I need to build a project from Ant.
I searched for unanswered answers. Related questions in SO that didn't help
How to fix this ZipException when compiling a Jenkins Android project?
Configure ant to run unit tests. Where should the libraries be? How to set up class path? avoiding ZipException
source share