0

I get a failure when exporting to a signed application with an app that is obfuscated with proguard, and includes market licensing.

It fails with Dalvik error 1.

If I disable proguard it works. If I disable licensing it works.

I need to use licensing and I need to obfuscate the main code.

Any suggestion?

Thanks Chris

I found a post with the answer! Modifying the proguard.bat file worked! Android SDK tools revision 12 has problem with Proguard => error conversion to Dalvik format failed with error 1

Community
  • 1
  • 1
  • Just a shot in the dark but when I first used progaurd I got errors (can't remember what though). I eventually worked out that it was because there were spaces in the path to my workspace (PC running XP). I ended up relocating my entire workspace to a new folder with no spaces init and it worked fine. – Squonk Jul 15 '11 at 10:57
  • Thanks, I had the same problem initially. This is new, turned up when I added the licensing code. – Chris Briscoe Jul 15 '11 at 11:07
  • I tried exporting the license sample app with proguard set. And that failed with the same error. – Chris Briscoe Jul 15 '11 at 11:37
  • Try what is recommended in the accepted answer here... http://stackoverflow.com/questions/2680827/conversion-to-dalvik-format-failed-with-error-1-on-external-jar – Squonk Jul 15 '11 at 11:44
  • Have done! Rebuilt a completely new and clean environment. This only happens when trying to export the signed app – Chris Briscoe Jul 15 '11 at 12:30

2 Answers2

0

Include this in your Proguard config:

-keep public class com.android.vending.licensing.ILicensingService
CrackerJack9
  • 3,650
  • 1
  • 27
  • 48
0

I just was fighting with this problem myself I had my work space on a path with no spaces, I had the sdk and eclpse also on paths with no spaces, none of my projects hand spaces in their names. I had also updated my sdk, eclipse, and jdk to no avail. I even found with the new version you gotta remove the _src folders and did that. still had the same error; could only export with out proguard

what I ended up doing is editing the proguard.bat file and the problem vanished, found this fix in a discussion about r12 and since nothing else was working I tried it and it worked

it's in: \tools\proguard\bin\proguard.bat

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

Kit Ramos
  • 1,533
  • 1
  • 15
  • 32