Search code examples
androideclipseexportandroid-sdk-1.6

how do i fix the error "conversion to dalvik format failed with error 1"?


I did search the site for help and one mentioned to try it with out any thing on the build path except for the android code itself. and that is all that I have on it! I built this with out using any external files. (infact a differnt one that I did do that does work) also I can get it to run in debug mode just fine even putting it on an actual phone and it works I just can't seem to export it. also to make it even more weird I copied the code to a flash drive and imported it into a differnt computer and with no modifcations i can export it there. just not here where I need to. I did go and check for updates on everything, nothing appears out of date, least all the "check for updates" tools for eclipse, java and Andorid SDK say so. I did manage to get this from the error log:

Error Stack Trace:
eclipse.buildId=I20110613-1736
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product

Error
Sun Sep 11 21:22:36 EDT 2011
Conversion to Dalvik format failed with error 1

com.android.ide.eclipse.adt.internal.build.DexException: Conversion to Dalvik format failed with error 1
at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:663)
at com.android.ide.eclipse.adt.internal.project.ExportHelper.exportReleaseApk(ExportHelper.java:204)
at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.doExport(ExportWizard.java:290)
at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.access$0(ExportWizard.java:229)
at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard$1.run(ExportWizard.java:214)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Session Data:
eclipse.buildId=I20110613-1736
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product

Solution

  • I found the answer apparently it's something that broke back in r12, showed up when I updated, thus prompting this question. and now yet again in r14 on which I had to completely uninstall and reinstall everything (including the JDK) to get a proper update. I thought I was good once I was finally back in able to run the app in test mode on my phone. but this problem reared it's ugly head again,and I must say it's really "lovely" how little information about what the error is. but I tried this and it worked when nothing else did!!

    Change

    call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %*

    to

    call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %1 %2 %3 %4 %5 %6 %7 %8 %9