【问题标题】:Gradle warning about "compile" even though none found即使没有找到关于“编译”的 Gradle 警告
【发布时间】:2018-10-07 12:25:48
【问题描述】:

我正在制作一个 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'

【问题讨论】:

标签: android android-studio gradle build.gradle


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2011-11-23
    • 2022-06-27
    • 2012-12-11
    • 2020-06-07
    • 1970-01-01
    • 2014-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多