警告:API'variant.getMergeResources()'已过时,并已替换为'variant.getMergeResourcesProvider()' [英] WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'
问题描述
每次构建应用程序时,我都会遇到此错误.我认为我已经更新了所有库,有人可以告诉我问题出在哪里?显然,我认为这可能来自Google Play服务,但我拥有我正在使用的所有库的最新版本.
I've been getting this error every time I build my app. I think that I have all the libraries updates, someone can tell me where is the problem? Apparently, I think that could be from Google Play services, but I have the last version of all the libraries that I'm using.
我找不到能解决问题的任何东西
I can't find anything that can fix the problem
警告:API'variant.getMergeResources()'已过时,并已替换为'variant.getMergeResourcesProvider()'. 它将在2019年底删除. 有关更多信息,请参见 https://d.android.com/r/tools/task-configuration-avoidance . 要确定正在调用variant.getMergeResources()的内容,请在命令行上使用-Pandroid.debug.obsoleteApi = true来显示更多信息. 受影响的模块:应用
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
推荐答案
它似乎是由gms服务4.3.0引起的.这似乎只是警告,不会引起任何问题.但是,如果您愿意,可以在项目级别的gradle文件中使用早期版本的gms服务来摆脱它:
Looks like it is caused by gms services 4.3.0. This seems to be just a warning and not causing any problems. However, if you want you can use an earlier version of gms services in your project level gradle file to get rid of it:
com.google.gms:google-services:4.2.0
这篇关于警告:API'variant.getMergeResources()'已过时,并已替换为'variant.getMergeResourcesProvider()'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!