同步 Gradle 时突然出现以下错误:
警告:API 'variant.getJavaCompile()' 已过时,已被 'variant.getJavaCompileProvider()' 替换。它将在2019年底之前被移除。 更多信息请参见https://d.android.com/r/tools/task-configuration-avoidance 受影响的模块:app
我有一个用于应用程序模块的 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
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
[...]
}
debug {
[...]
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.61"
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "com.android.support:preference-v7:28.0.0"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
implementation 'com.google.android.material:material:1.0.0-rc02'
[...]
}
我能正确编译这个应用程序,但有点困扰,我发现在2019年底的时候,某些东西将停止工作。 有什么想法是什么,以及如何解决?
我能够正确编译应用程序,但是有点麻烦,我觉得到了2019年底会有一些东西停止工作。你有任何想法是什么以及如何解决吗?
4.3.1
版本中仍然存在,可以在https://github.com/google/play-services-plugins/issues/65上跟踪。在`build.gradle(Project)`中使用版本`4.2.0`似乎是最可行的解决方案。 - Asghar Musani