Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'

I've been getting this warning 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

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

like image 541
S.P. Avatar asked Jul 02 '19 08:07

S.P.


2 Answers

I had exactly same warning and i removed this line from my app's build.gradle.

apply plugin: 'com.google.gms.google-services'

Turned out i didn't need the plugin and the warning disappeared.

like image 55
Pancho Dyck Avatar answered Nov 17 '22 12:11

Pancho Dyck


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
like image 5
user846316 Avatar answered Nov 17 '22 13:11

user846316