osx - Android Export Wizard fails creating signed apk cause of duplicate entry .ds_store when Proguard is enabled on Mac OS X -


the android export wizard throws zipexception caused duplicate entry .ds_store. there way tell proguard and/or android export wizard ignore .ds_store files , solve problem?

this detailed long story:

i wanted enable proguard android project. uncommented following line project.properties of android project

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

now when try export signed apk eclipse (right click on project -> android tools -> export signed application package) export wizard fails returning failed export application.

from error log view of eclipse appear error. double clicking on stacktrace:

org.eclipse.core.runtime.coreexception: failed export application     @ com.android.ide.eclipse.adt.internal.project.exporthelper.exportreleaseapk(exporthelper.java:318)     @ com.android.ide.eclipse.adt.internal.wizards.export.exportwizard.doexport(exportwizard.java:296)     @ com.android.ide.eclipse.adt.internal.wizards.export.exportwizard.access$0(exportwizard.java:233)     @ com.android.ide.eclipse.adt.internal.wizards.export.exportwizard$1.run(exportwizard.java:218)     @ org.eclipse.jface.operation.modalcontext$modalcontextthread.run(modalcontext.java:121) caused by: java.util.zip.zipexception: duplicate entry: .ds_store     @ java.util.zip.zipoutputstream.putnextentry(zipoutputstream.java:215)     @ java.util.jar.jaroutputstream.putnextentry(jaroutputstream.java:109)     @ com.android.ide.eclipse.adt.internal.project.exporthelper.addfiletojar(exporthelper.java:407)     @ com.android.ide.eclipse.adt.internal.project.exporthelper.addfiletojar(exporthelper.java:394)     @ com.android.ide.eclipse.adt.internal.project.exporthelper.exportreleaseapk(exporthelper.java:242)     ... 4 more

so looks zipexception throwed because there multiple .ds_store files (which hidden system files of mac os x).

with ant, add file filters -injars options of proguard task in <android-sdk>/tools/ant/build.xml. instance:

-injars ${project.all.classes.value}(!**.ds_store) 

this tells proguard ignore .ds_store files when reading input.

with eclipse, configuration hard-coded, that's not possible.

other developers on macos x may know more...


Comments