WARNING: API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProv

AndroidStudio3.4.1 编译项目时遇到以下警告(API过时):

WARNING: API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'.
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.getAssemble(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app

当前版本:

  • AS:3.4.1
  • Kotlin:1.3.21
  • Gradle:5.1.1
  • Gradle Plugin:3.4.1

解决办法:
降低Gradle Plugin版本,改为3.2.1,可以消除警告。

你可能感兴趣的:(WARNING: API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProv)