Search Unity

What is the best way to avoid Multi Dex error while installing new plaugins?

Discussion in 'Android' started by rahat090255, Nov 13, 2018.

  1. rahat090255

    rahat090255

    Joined:
    Aug 15, 2018
    Posts:
    18
    Hello, I am totally sick of multi dex problem. At first I got those problem when I installed

    1. Google mobile ads
    2. Facebook
    3. Facebook Audience Network

    Then I solved this problem by deleting the common jar files from the facebook audience network >plugins>android> lib.

    But after that when I imported the facebook mediation plugin then I got multi dex Error.

    Code (CSharp):
    1. * What went wrong:
    2. Execution failed for task ':transformDexWithDexForRelease'.
    3. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/exoplayer2/source/dash/BuildConfig;
    Even importing unity ad mediation also gives me multidex error while building.

    Even if I try to build the project only
    1. Google mobile ads
    2. Facebook
    3. Unity Ad Mediation

    then I also get the multi dex error.

    Not only those plugin If i tried to import onsignal plugin it also gives me multi dex while building.
    Please give me a solution for this multi dex problem.
     
    Last edited: Nov 13, 2018