0

I've developed an app. and when I tried to run it says "Conversion to Dalvik format failed with error 1"

I've tried at some solutions given in Stackoverflow here.

  1. Ensuring there is no duplicate jars
  2. changing the proguard message

and still its the same.. is there any other solution for this? and why does this error occurs ?

Jorgesys
  • 124,308
  • 23
  • 334
  • 268
Stenly
  • 11
  • 1
  • There are several suggestions [here](http://stackoverflow.com/questions/2680827/conversion-to-dalvik-format-failed-with-error-1-on-external-jar). One that I often used was to make sure there are no jar files in the libs folder of your project. – Spaceman Spiff Oct 08 '14 at 18:21
  • Any prior errors that would actually tell what went wrong? – laalto Oct 09 '14 at 05:52

2 Answers2

0

This error has several causes, i unselect "Build Automatically" option, from Project -> Build Automatically, Then clean the project and Build all.

But read this, it worked for me:

http://viktorbresan.blogspot.com.tr/2012/10/conversion-to-dalvik-format-failed-with.html

The fix would be the following: you need to add !code/allocation/variable string to your -optimizations command in ProGuard config file. Mine looks like the following:

-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable
Jorgesys
  • 124,308
  • 23
  • 334
  • 268
0

Go to Project and then uncheck "Build Automatically".Then try to export the project and the error is gone.

kgandroid
  • 5,507
  • 5
  • 39
  • 69