我已经将我的google-services插件更新到了4.3.0
当我同步我的项目时,我得到以下警告。
WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.
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.getMergeResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app如何修复此警告?
发布于 2019-07-04 04:47:48
此警告是由一些库或插件产生的,这些库或插件被用作依赖项,但没有更新到新的API。如果要检测,请在项目的gradle.properties文件中包含以下内容:
android.debug.obsoleteApi=true正如这个official link to the gradle features声明的那样,它将帮助您确定在何处使用过时的API。禁用您在日志中找到的插件,错误应该会消失。
但是,请在其Github存储库上为该库创建一个问题,这就是为什么您在google上搜索此警告时会看到大量GitHub库存在此类警告(Google AR Sceneform Android SDK、Flutter、GreenDAO等)的开放问题。然后就得由他们来解决了。希望它能帮上忙!
特别注意:如果你正在使用fabric/crashlytics,你最有可能看到这个警告。
buildscript {
//..
dependencies {
//..
classpath 'io.fabric.tools:gradle:1.28.0'
}
}https://stackoverflow.com/questions/56875662
复制相似问题