Could not set unknown property 'enableR8' for object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension
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