本文介绍了当Android Studio更新到v3.3时,获取API'variant.getAssemble()'已过时,并已替换为'variant.getAssembleProvider()'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
获得此警告(即使未在任何地方使用variant.getAssemble()
):
Getting this Warning (Even when variant.getAssemble()
is not used anywhere):
API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'.
我更新了以下组件:Android Studio
I have updated following components:Android Studio
Gradle插件
成绩分配网址(gradle-wrapper.properties)
gradle.properties
gradle.properties
推荐答案
variant.assemble 已被弃用,并由新的提供程序API取代.
variant.assemble has been deprecated and replaced by a new provider API.
例如,如果您将其用作下一个:
If for example you are using it as next:
variant.outputs.all { output ->
variant.assemble.doLast {
....
}
}
}
然后将其替换为新的提供程序API:
Then replace it the new provider API:
variant.outputs.all { output ->
variant.getAssembleProvider().configure() {
it.doLast {
....
}
}
}
这篇关于当Android Studio更新到v3.3时,获取API'variant.getAssemble()'已过时,并已替换为'variant.getAssembleProvider()'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!