我在项目中遇到非常烦人的警告:
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.
REASON: It is currently called from the following trace:
...
WARNING: Debugging obsolete API calls can take time during configuration. It's recommended to not keep it on at all times.
Affected Modules: app
Run Code Online (Sandbox Code Playgroud)
由于该警告将在明年成为错误,因此我想一劳永逸地修复它。
我已经更新了gradle插件,google play服务插件和所有依赖项,但是问题仍然存在。
这是项目级别的build.gradle文件:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.3.0'
}
} …Run Code Online (Sandbox Code Playgroud) 每次我构建应用程序时,都会遇到此错误。我认为我已经更新了所有库,有人可以告诉我问题出在哪里?显然,我认为这可能来自Google Play服务,但是我拥有所用所有库的最新版本。
我找不到能解决问题的任何东西
警告:API'variant.getMergeResources()'已过时,已被'variant.getMergeResourcesProvider()'取代。它将于2019年底删除。有关更多信息,请参见https://d.android.com/r/tools/task-configuration-avoidance。要确定正在调用variant.getMergeResources()的内容,请在命令行上使用-Pandroid.debug.obsoleteApi = true来显示更多信息。受影响的模块:应用