Unable to execute dex: Multiple dex files define Lcom/mopub/mobileads/AdFetcher$FetchStatus;

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

  •  21-06-2022
  •  | 
  •  

Question

Ever since the update that I've downloaded in the ADT, I can't test my apps. My console keeps giving me this error:

Unable to execute dex: Multiple dex files define Lcom/mopub/mobileads/AdFetcher$FetchStatus;

It implies that my mopub library isn't synching well with my main project.

I've moved my libraries to all my main project and to the other library, cleaned all projects and deleted/edited my build pathways in most possible ways, so is there anyone that has a solution?

Was it helpful?

Solution

Somehow you're ending up with two copies of the library to be compiled. This usually happens when both your app and an included library depend on a third-party library.

For example:

Support lib -> App <- Library <- Support lib

Where A <- B means that A depends on B.

Remove the direct dependency in the app project and you will inherit the one from the library. In the example above that would be the dependency on the left.

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