Android Studio build.gradle 警告信息

Android Studio build.gradle warning message(Android Studio build.gradle 警告信息)
本文介绍了Android Studio build.gradle 警告信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我成功更新到 Android Studio 3.1 Canary 9 后,我收到警告消息

After i have successfully updated to Android Studio 3.1 Canary 9 i am getting warning message as

Warning:Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018

我知道这个警告至少目前不会在我的项目中造成任何问题.但是我想完全删除它,以便将来完全没有问题.但是在查看了我的 build.gradle 文件后,我根本找不到任何调用此警告的代码行.

I know this warning will not cause any problem in my project at least for now. But i want to remove it totally so that there will be no problem in future at all. But after reviewing my build.gradle file i cannot find any line of code which has invoked this warning at all.

这是我的 build.gradle 文件

Here is my build.gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "app.project.virtualdiary"
        minSdkVersion 21
        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 'com.google.firebase:firebase-auth:11.8.0'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.0.2'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.android.support:support-v4:27.0.2'
    implementation 'com.android.support:support-vector-drawable:27.0.2'
}


apply plugin: 'com.google.gms.google-services'

推荐答案

问题出在apply plugin: 'com.google.gms.google-services'

Google 服务插件正在代表您添加依赖项.希望他们在未来修复它.

The Google Services plugin is adding a dependency on behalf of you. Hopefully they fix it in the future.

这篇关于Android Studio build.gradle 警告信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)