WARNING: API 'variant.getPackageLibrary()' is obsolete and has been replaced with 'variant.getPackageLibraryProvider()'.It will be removed at the end of 2019.For more information, see https://d.android.com/r/tools/task-configuration-avoidance.To determine what is calling variant.getPackageLibrary(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.Affected Modules: bureau_of_education

android studio 升级为3.4版本后.大部分都是出现这种类似的警告.

看见这种警告,我的感觉是特别烦的.总想着把他成功去除警告才有成就感.

解决方法很简单:

1. 把项目切换成project..

2.找到与app同级的build.gradle

3.将buildscript->dependencies->classpath 里面的依赖更新为有效的最新版本

buildscript {    repositories {        ......          maven {            url 'https://maven.fabric.io/public'         }    }    dependencies {        ......        classpath 'com.android.tools.build:gradle:3.4.0'//最新androidStudio版本        classpath 'io.fabric.tools:gradle:1.28.0' //更新为最新依赖        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}

4.重新make project 项目(快捷键ctrl+f9).

 

知道方法了很简单.不知道每次都出现警告影响coding心情.

希望能对你带来帮助!!!!!!!Android : Android Studio 3.4更新至gradle 5.1.1的问题_第1张图片

微信加好友可以共同进步

更多相关文章

  1. build.gradle文件介绍,gradle版本对应
  2. Android SDK Manager无法获取其他版本的问题
  3. Android移动开发之【Android实战项目】渐变的TextView小漂亮代码
  4. 修改 android版本 签名问题
  5. 修改android版本号
  6. SQlite与android 的数据交互 (android 项目心得三)
  7. 问题:在运行android的项目时出现的异常
  8. undefined reference to '__android_log_print'(android studio1
  9. 在低版本Android上使用Material Design——AppCompat v21

随机推荐

  1. Android的SharedPreferences的使用介绍
  2. Android(安卓)Studio,gradle project sync
  3. eclipse中加入写好的android工程和出现的
  4. Android提交数据到服务器的两种方式四种
  5. 使用国内开源镜像下载Android(安卓)SDK
  6. android源代码分布结构
  7. Eclipse无法显示Android设计界面解决方案
  8. Chromecast
  9. Android(安卓)百分比布局详解及实例代码
  10. Android unspecified' depends on one or