Android防踩坑指南(二)
解决错误:API ‘variant.getPackageLibrary()’ is obsolete and has been replaced with 'variant.getPackageLibraryProvider
你可能出现过下面这种错误
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: XXX
第一步
打开项目根目录build.gradle,找到以下配置
buildscript {
ext.kotlin_version = '1.3.31'
repositories {
goo