27
警告:API'variant.getJavaCompile()'已过时,已被'variant.getJavaCompileProvider()'取代
同步Gradle时突然出现此错误: 警告:API'variant.getJavaCompile()'已过时,已被'variant.getJavaCompileProvider()'取代。它将在2019年底删除。有关更多信息,请参见https://d.android.com/r/tools/task-configuration-avoidance 受影响的模块:应用 我build.gradle为应用模块准备了这个: apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'com.google.gms.google-services' apply plugin: 'io.fabric' android { compileSdkVersion 28 buildToolsVersion "28.0.2" defaultConfig { applicationId "..." minSdkVersion 21 targetSdkVersion 28 versionCode 1 versionName "..." testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" versionNameSuffix = version_suffix [...] } buildTypes { release { minifyEnabled false …