简体   繁体   中英

Could not set unknown property 'enableR8' for object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension

i add this code in android studio 3.2;

  android.enableR8 = true

Could not set unknown property 'enableR8' for object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension What does it mean ?

Upgrade your project to Android-Studio-3.2 means classpath 'com.android.tools.build:gradle:3.2.0' in Top-level gradle

then set property android.enableR8 = true into gradle.properties

在此输入图像描述

R8, the new code shrinker from Google, is available in Android studio still in beta version

R8 does all of shrinking, desugaring and dexing in one step. When comparing to the current code shrinking solution, Proguard, R8 shrinks the code faster while improving the output size.

Turn on R8 by default use below code in gradle.properties

org.gradle.daemon=true

org.gradle.parallel=true

org.gradle.jvmargs=-Xmx4096m -Xss4m -XX:MaxPermSize=512m

android.enableR8=true

android.enableR8.fullMode=true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM