Android Studio 3.0 Unable to merge dex

前端 未结 6 2062
遇见更好的自我
遇见更好的自我 2020-12-31 12:13

Just Updated android studio from 2.3.3 to 3.0 now I am having the error

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


        
6条回答
  •  南笙
    南笙 (楼主)
    2020-12-31 12:20

    multiDexEnabled true

    Example

    android {
        compileSdkVersion 25
        buildToolsVersion '26.0.2'
        defaultConfig {
            applicationId "com.xx.xxx"
            minSdkVersion 15
            targetSdkVersion 24
            versionCode 9
            versionName "1.0"
            multiDexEnabled true //Add this
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                shrinkResources true
                minifyEnabled true
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        } }
    

提交回复
热议问题