Error:Build-in class shrinker and multidex are not supported yet

Jonas Borggren picture Jonas Borggren · Feb 25, 2016 · Viewed 9.8k times · Source

After adding useProguard true and multidexEnabled true to my built types this error comes up when trying to build:

Error:Build-in class shrinker and multidex are not supported yet.

compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
    applicationId "com.example.android
    minSdkVersion 16
    targetSdkVersion 23
    versionCode gitVersionCode()
    versionName gitVersionName()
    multiDexEnabled true
}

buildTypes {
    debug {
        ...
        useProguard false
        debuggable true
    }
    release {
        ...
        useProguard true
    }

Running Android Studio 2.0 Beta 5.

Any solution besides removing multidex?

Answer

Ugurcan Yildirim picture Ugurcan Yildirim · Feb 25, 2016

useProguard became minifyEnabled. Try the following:

android {
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
        }
    }
}