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心情.
希望能对你带来帮助!!!!!!!
微信加好友可以共同进步