Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to execute dex: Multiple dex files define Lcom/google/android/gms/analytics/internal/Command

I updated my Android SDK last night (31.4) and after that I canot compile my app anymore. I get this error:

[2015-05-01 14:36:24 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/google/android/gms/analytics/internal/Command$1;
[2015-05-01 14:36:24 - SoFit] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/google/android/gms/analytics/internal/Command$1;

I have not changed anything in my jars. Here is my libs structure: enter image description here

I tried to: - Clean project. - Restart eclipse. - Delete the bin folder. - Remove private libraries.

I also tried to remove the google analysts jar because I though that from the recent google play services update they put the analysts inside the lib. But it wont compile either because of missing classes.

My guess that something with the google play services is wrong but I canot find what.

like image 701
dasdasd Avatar asked May 01 '15 11:05

dasdasd


3 Answers

Try to remove "libGoogleAnalyticsServices.jar" from your directory libs and also update the code As v2 doesnt support anymore. Then Clean it and Run. Everything will be fine.

like image 114
WhiteHorse Avatar answered Nov 12 '22 07:11

WhiteHorse


google analysts v2 is not supported anymore... I have to use v4 which is included in the google services.

like image 31
dasdasd Avatar answered Nov 12 '22 06:11

dasdasd


Remove libGoogleAnalyticsServices.jar from your build and add Google Play Services.

The minimum required configuration:

compile 'com.google.android.gms:play-services-base:7.5.0'
compile 'com.google.android.gms:play-services-analytics:7.5.0'
like image 6
Vaiden Avatar answered Nov 12 '22 07:11

Vaiden