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

时光毁灭记忆、已成空白 提交于 2019-11-27 09:17:29

The latest version of the Google Services Gradle Plugin (4.3.0) is causing this, downgrading the version to 4.2.0 seems to solve the issue temporarily (source). However Google will release an updated version of this before the end of 2019. Until then;


In your project-level build.gradle file, under buildscript -> dependencies. Check whether you have this line

classpath 'com.google.gms:google-services:4.3.0'

if so, change it to

classpath 'com.google.gms:google-services:4.2.0'

Please change your classpath dependency in project level Gradle:

buildscript {

    dependencies {

         classpath 'com.android.tools.build:gradle:3.1.4'
    }
 }

I am using it. It is working fine. This is a stable version. Hope this issue will be fixed in the future version of this dependency.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!