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.
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
I downloaded Proguard 4.6 and copied the contents of /lib and /bin into /tools/proguard/ which fixed the problem.
The only solution i've found to this problem is to change, in proguard.cfg
-optimizationpasses 5
to
-optimizationpasses 2
I encountered the same issue with Android SDK Tools Rev 16 attempting to export a signed application package from Helios Eclipse 3.6 on Mac OS X 10.7.2 for execution on a Samsung Galaxy Nexus 4.0.2 build ICL53F
Problem:
[2012-01-11 03:15:46 - Chapter 8 Where Am I] Proguard returned with error code 1. See console
[2012-01-11 03:15:46 - Chapter 8 Where Am I] proguard.ParseException: Unknown option '8' in argument number 9
[2012-01-11 03:15:46 - Chapter 8 Where Am I] at proguard.ConfigurationParser.parse(ConfigurationParser.java:170)
[2012-01-11 03:15:46 - Chapter 8 Where Am I] at proguard.ProGuard.main(ProGuard.java:491)
Solution:
cd /Applications/android-sdk-mac_x86/tools/proguard/bin
then modify file proguard.sh
as follows:
# java -jar "$PROGUARD_HOME"/lib/proguard.jar "$@"
java -jar "$PROGUARD_HOME"/lib/proguard.jar "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With