Error:Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.

I created a new project with compile my old modules but when I tried launching the app it did not launch with the message:


Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

> com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Please any one can help me !!!

Beginner Asked on July 11, 2018 in Mobile Dev.
Add Comment
1 Answer(s)

since flutter default min sdk version for android is 16 , you have to add the following dependancies in your app level gradle file to enable multidex as mentioned in documentation https://developer.android.com/studio/build/multidex

 

android {
    defaultConfig {
        ...
        minSdkVersion 16 
        targetSdkVersion 27
        multiDexEnabled true
    }
    ...
}

dependencies {
  compile 'com.android.support:multidex:1.0.3' 
}
Beginner Answered on November 2, 2019.

Thank you 🙂

on November 2, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.