Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conversion to Dalvik format failed: Unable to execute dex SDK Tools 22.3

Tags:

android

Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode

Latest ADT, Latest SDK Tools (22.3).

I Tried :

  1. Clean/rebuild
  2. Update Eclipse
  3. Delete bin and gen folders
  4. Restart Eclipse
  5. Mannually build with Ant
  6. Plus some other stuff

All my projects are now targeting API lvl 19.

I have no clue what to do.

Thanks

like image 746
Philippe David Avatar asked Nov 01 '13 19:11

Philippe David


2 Answers

The multiple dex files error just tell you that you are including the same class file from different sources. Restarting Eclipse or building with Ant will therefore not help as your project setup is just invalid.

As you do not specify what jars you are using, there is no way to tell what is going on for sure.

However, the newest Google Play library includes ads and my guess would be that you are including both Admob and Google Play Services which apparently contain the same classes. In that case you should migrate your code to use the Google Play Service ads and remove the admob jar from your project.

like image 157
botteaap Avatar answered Oct 14 '22 21:10

botteaap


*Right click on project name and select the Build Path.

*Then select Configure Build Path.

*From Java Build Path select the tab Order and Export.

*Uncheck the .jar libraries.

The error is generally due to multiplicity in libraries.

like image 36
Jose Kurian Avatar answered Oct 14 '22 22:10

Jose Kurian