The error occurs upon building a (on my case, it's PhoneGap) project running on Eclipse. This is caused of having two *.jar files inside the bin/dexedLibs directory. These files are generated every time you build your application.

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

Usually, multiple dex files error tells you that you are including the same class file from different sources.

Solution

To resolve this, simply do the following:
  1. Open Project's Properties » Java Build Path » Order and Export.
  2. Uncheck Android Private Libraries on the list
  3. Clean and re-build your application

After doing the steps above, your project should now build and compile properly.

On my case, since my Eclipse is on auto-build, this is usually generated every time I restarted my IDE.

No comments :

Post a Comment