Android Studio 3.0 Execution failed for task: unable to merge dex

前端 未结 26 3523
野性不改
野性不改 2020-11-27 11:52

android studio was getting build error while build execution with following:

Error:Execution failed for task \':app:transformDexArchiveWithExternalLi

26条回答
  •  我在风中等你
    2020-11-27 11:56

    1)Please add multiDexEnabled true
    2)if you get compilation error then check your app level build.gradle weather same dependencies are implemented with different versions.
    3)Remove one if you find same dependencies.
    

    android { compileSdkVersion 28 defaultConfig {

        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    
    hope it works fine :) Happy Coding
    

提交回复
热议问题