Android Gradle插件(警告)API'variant.getMergeResources()'已过时,并已替换为'variant.getMergeResourcesProvider()' [英] Android Gradle Plugin (Warning) API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'
问题描述
我正在尝试构建和运行此存储库 augmented-images ,我遇到了这个错误.
I am trying to build and run this repository augmented-images and I encounted this error.
由以下原因引起:java.lang.RuntimeException:创建sfa时出错.
Caused by: java.lang.RuntimeException: Error creating sfa.
深入了解此警告警告! API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'
.
Which drill down to this warning Warning ! API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'
.
更多有关构建日志分析的信息,我看到以下错误 错误:无法导入"sampledata/airplane/Airplane.obj"
More from the build log analysis I see the following errors ERROR: Failed to import 'sampledata/airplane/Airplane.obj'
我试图找到这个地方
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.
推荐答案
将classpath 'com.google.gms:google-services:4.3.0'
更改为classpath 'com.google.gms:google-services:4.2.0'
的操作暂时有效.
Changing classpath 'com.google.gms:google-services:4.3.0'
to classpath 'com.google.gms:google-services:4.2.0'
works for now..
这篇关于Android Gradle插件(警告)API'variant.getMergeResources()'已过时,并已替换为'variant.getMergeResourcesProvider()'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!