在我的构建类型中添加useProguard true和multidexEnabled true之后,在尝试构建时会出现此错误:
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 }
运行Android Studio 2.0 Beta 5.
解决方法
useProguard成为minifyEnabled.请尝试以下方法:
android { buildTypes { release { minifyEnabled true shrinkResources true } } }