使用较新的gradle版本,registerTransform 会构建失败

来源:6-6 实战:实现类的拷贝逻辑【实现Transform】

qq_夜_71

2023-07-26

  • What went wrong:
    An exception occurred applying plugin request [id: ‘king.router’]

Failed to apply plugin ‘king.router’.
API ‘android.registerTransform’ is removed.

 For more information, see https://developer.android.com/studio/releases/gradle-plugin-api-updates#transform-api.
 To determine what is calling android.registerTransform, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.

我的gradle 版本是:
distributionUrl=https://services.gradle.org/distributions/gradle-8.0-all.zip

写回答

1回答

allenfeng

2023-08-11

Transform 在 最近的 8.0 中被废弃,你可尝试改用课程Demo同样的Gradle版本。

0
0

Android 应用程序构建实战+原理精讲

深度掌握 Gradle 使用,系统性学习 Android 应用构建知识

461 学习 · 116 问题

查看课程