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

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

  •  21-06-2022
  •  | 
  •  

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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top