Android Gradle Plugin (Warning) API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'

房东的猫 提交于 2019-12-30 18:05:09

问题


I am trying to build and run this repository augmented-images and I encounted this error.

Caused by: java.lang.RuntimeException: Error creating sfa.

Which drill down to this warning Warning ! API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.

More from the build log analysis I see the following errors ERROR: Failed to import 'sampledata/airplane/Airplane.obj'

I tried to find where this

variant.getMergeResources()

is used so I can replace it but no luck.

Please assist maybe I need to update the plugin. Which steps should I follow that is what I suspect will be the solution.


回答1:


Changing classpath 'com.google.gms:google-services:4.3.0' to classpath 'com.google.gms:google-services:4.2.0' works for now..




回答2:


Now it is fixed with the release 'com.google.gms:google-services:4.3.2'

This issue is caused by the versions of the Google Services pluigin for gradle 4.3.0 and 4.3.1.



来源:https://stackoverflow.com/questions/54878137/android-gradle-plugin-warning-api-variant-getmergeresources-is-obsolete-an

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