Gradle警告"compile"即使没有找到



我正在制作一个Android应用程序,但不断收到以下警告。此警告阻止我在克隆存储库时连接到另一台 PC 上的 Firebase。

Warning:Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.

我已经用实现替换了所有"编译",但仍然收到警告。下面是build.gradle文件:

apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "ak1195apps.employeelogs"
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'joda-time:joda-time:2.10'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:27.1.1'
}
apply plugin: 'com.google.gms.google-services'

升级到 gradle 3.2.0 解决了这个问题。

最新更新