Android SDK tools revision 12 has problem with Proguard => error conversion to Dalvik format failed with error 1

Yongki picture Yongki · Jul 7, 2011 · Viewed 14.3k times · Source

I have just updated to Android SDK tools revision 12, immediately my application can't be exported with previous Proguard setting. I received the "Conversion to Dalvik format failed with error 1", the only library I use is "jcifs". I have tried cleaning and rebuilding, create a new project, and reassembling and I believe I have done almost anything I can read in the Internet. Is this a new bug from this new SDK? I suggest don't update for the time being if your project use Proguard.

UPDATE 1: I also tried to export a simple Hello application with proguard set, still the same message. It looks like something is broken with this version of SDK tool.

UPDATE 2: I have to delete the whole tools folder in SDK directory and copy a backup of SDK tools revision 11 into it. At least I can go back to work and export with proguard works again. I hope this information helps whoever in the same situation. I still have no idea what is going on though, hope someone can shed a light on this annoying issue.

UPDATE 3: I have reported this issue as a bug here: http://code.google.com/p/android/issues/detail?id=18359 hope someone takes a good look at the issue, until then you will be advised to stay out of this version if you are using Proguard in your development.

Answer

Alan picture Alan · Jul 11, 2011

The problem is caused by ProGuard command line in R12 in the file [Android SDK Installation Directory]\tools\proguard\bin\proguard.bat. Simply edit the following line will solve the problem.

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