2

When i tried to run my application -and it's a class extends from the zxing project which i marked it as liberary- the console give me the following error:

[2012-09-12 11:51:01 - QR00] Conversion to Dalvik format failed with error 1

Any suggestions to solve this error?

Amrmsmb
  • 1
  • 27
  • 104
  • 226

3 Answers3

1

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 file into my src folder) 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.

Refer the related question:

"Conversion to Dalvik format failed with error 1" on external JAR

Community
  • 1
  • 1
1

Have you tried looking here and here. This topic is also thoroughly discussed here. Try searching a little bit before you ask a question.

Community
  • 1
  • 1
slezadav
  • 6,104
  • 7
  • 40
  • 61
0

If you are using ActionBarSherlock, watch out for ADT inserting the compatibility library into your project. ActionBarSherlock embeds this library and the duplication causes the error.

Mark Rosenberg
  • 153
  • 1
  • 7