Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/squareup/okhttp/Address;

StackOverflow https://stackoverflow.com/questions/23446603

  •  14-07-2023
  •  | 
  •  

Question

I've seen this question asked about 100 times on StackOverflow, but this isn't a one answer that solves them all. Here is my build path: Java build path

However I still get:

[2014-05-03 11:44:33 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/squareup/okhttp/Address;
[2014-05-03 11:44:33 - Untappd] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/squareup/okhttp/Address;

What is the best and easiest way to solve this issue? I got it when i tried to manually add a new version of Aviary SDK to my project by deleting the old project and adding the new one. I've tried cleaning and rebuilding and it doesn't work.

Was it helpful?

Solution

I found out the problem, thanks to this reply by Joe Bowser (https://twitter.com/infil00p/status/462639837149798400). The problem here is the Aviary and Phonegap are both using the Lcom/squareup/okhttp framework, so I had to delete the okhttp framework from the CordovaLib directory, and re-run the project.

CordovaLib has okhttp framework built it, and Aviary wants to use use it as well

OTHER TIPS

The multiple dex files error tells you that you are including the same class file from different sources. Please make sure you are not doing so. Check the libs folder too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top