Java – Failed to execute dex: Multiple dex files define Lcom/squareup/okhttp/Address;

Failed to execute dex: Multiple dex files define Lcom/squareup/okhttp/Address;… here is a solution to the problem.

Failed to execute dex: Multiple dex files define Lcom/squareup/okhttp/Address;

I’ve seen this question being asked about 100 times on StackOverflow, but it’s not an answer to all of them. Here is my build path:
Java build path

But 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 problem? I get it when I try to manually add a new version of the Aviary SDK to my project by deleting the old one and adding a new one. I have tried cleaning and rebuilding but it didn’t work.

Solution

Thanks to Joe Bowser ( https://twitter.com/infil00p/status/462639837149798400) reply, I found the problem. The problem here is that both Aviary and Phonegap use the Lcom/squareup/okhttp framework, so I had to remove the okhttp framework from the CordovaLib directory and rerun the project.

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

Related Problems and Solutions