Conversion to Dalvik format failed: Unable to execute dex SDK Tools 22.3
Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode
Latest ADT, Latest SDK Tools (22.3).
I Tried :
- Update Eclipse
- Delete bin and gen folders
- Restart Eclipse
- Mannually build with Ant
- Plus some other stuff
All my projects are now targeting API lvl 19.
I have no clue what to do.
7 Solutions collect form web for “Conversion to Dalvik format failed: Unable to execute dex SDK Tools 22.3”
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.
*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.
Have you checked your xml files? I have the same Problem (and it is not solved yet) and I forgot to change the adView attribute from:
then you should also chech your
(dunno if this is right though…)
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.gms.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adUnitId="MY_AD_UNIT_ID" ads:adSize="BANNER"/> </LinearLayout>
Ok now I solved my Problem. I am such an Idiot…
Well I integrated the AdMob SDK in the services library… I deleted it and everything was great again! So delete the services_lib, download it and import again that should work I guess. Good Luck!
Worked fine after delete the “GoogleAdMobAdsSdk-6.4.1.jar” from my project.
Dont forget to add the Google Play Services as Library to your app.
It’s because Google Play Service has google Ads in it.
That’s why you’re having multiple dex error.
If you are using google play service as well, then there is a conflict.
Eclipse project properties->Java build path->Order and export
Uncheck Android private libraries.
Do not use jar file and library project together of google play service lib in your project.