6

I am seeing 'Conversion to dalvik format failed with error 1' when exporting my app but I dont see anything in the console output to help me resolve it

I have restarted eclipse and checked the console and I dont see anything?

Where do the proguard logs get stored?

When running the app without proguard all works fine

user964283
  • 853
  • 4
  • 11
  • 16

6 Answers6

7

Update your version of proguard to the latest version: http://proguard.sourceforge.net/

Jave
  • 31,598
  • 14
  • 77
  • 90
  • http://sagistech.blogspot.com/2011/07/error-conversion-to-dalvik-format.html will help. – Murat Feb 04 '12 at 08:38
  • This was the one that fixed my issue. – chuz Nov 07 '13 at 03:47
  • 1
    This fixed my issue. I now use 4.11 version of proguard. And everyone should now that, whenever you update Android Build Tools, it will put the old version back. – tasomaniac Jun 11 '14 at 12:34
4

Go to Project » Properties » Java Build Path » Libraries and remove all except the "Android X.Y" (in my case Android 1.5). click OK. Go to Project » Clean » Clean projects selected below » select your project and click OK. That should work.

It is also possible that you have a JAR file located somewhere in your project folders (I had copied the Admob jar into my src forlder) and THEN added it as a Java Path Library. It does not show up under the Package Explorer, so you don't notice it, but it does get counted twice, causing the dreaded Dalvik error 1.

Answer was found in this question

Community
  • 1
  • 1
silleknarf
  • 1,219
  • 6
  • 22
  • Until I can get the console output from Proguard I cannot see what the issue is causing 'Conversion to dalvik format failed with error 1' I tried doing a clean as suggested but no luck, there must be a file somewhere which contains the Proguard logs? – user964283 Dec 16 '11 at 18:34
  • If you click your workspace and press F5 it will refresh your project, often logs will appear in the root of your project – silleknarf Dec 16 '11 at 18:38
  • Still no luck! This is so annoying! So when you guys export the apk you see the progruard output in the console window? any config for this? – user964283 Dec 16 '11 at 19:40
  • I am currently exporting the app through right clicking on the project -> Android Tools -> Export signed app Is that the correct way when proguard is enabled? – user964283 Dec 16 '11 at 20:01
  • Never used ProGuard but apparently you can turn on and off logging by changing the value of config.logging in build.properties – silleknarf Dec 16 '11 at 20:35
1

For me problem was that included proguard.config as:

proguard.config=proguard-project.txt

instead of (forget to mention default proguard config)

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
Dmitry Zaytsev
  • 23,650
  • 14
  • 92
  • 146
0

I found a solution. I had linked a library which had android-support jar file and even the referencing project had an android-support jar file. initially i renamed but still dint work. Since there was already an android-support jar file from the library file that i added, i deleted the android-support jar file present in the referencing project and hence the issue was solved :)

shrikanth
  • 129
  • 3
  • 9
0

I am using Pro-Guard. After all the checking imported .jar files, cleaning and rebuilds the error still occur. But I found another way to get out from this and successfully export signed package. This is through deleting bin and gen folder in you project folder. Go back to eclipse and clean your project.

Hope this helps.

0

I am using Eclispe IDE and I faced the same issue during Export Signed app.

I changed in the proguard.cfg to avoid optimization (-dontoptimize) and everything is going smoothly

Colateral
  • 1,736
  • 2
  • 18
  • 22