Transform API 没有单一的替代品 - android?

WIS*_*SHY 13 android gradle android-studio

我最近将我的 android studio 更新到版本 - 2021.2.1 Patch 2\n我的 gradle 分发版本是7.3.3

\n

当我构建项目时,出现以下错误

\n
API 'android.registerTransform' is obsolete.\nIt will be removed in version 8.0 of the Android Gradle plugin.\nThe Transform API is removed to improve build performance. Projects that use the\nTransform API force the Android Gradle plugin to use a less optimized flow for the\nbuild that can result in large regressions in build times. It\xe2\x80\x99s also difficult to\nuse the Transform API and combine it with other Gradle features; the replacement\nAPIs aim to make it easier to extend the build without introducing performance or\ncorrectness issues.\n\nThere is no single replacement for the Transform API\xe2\x80\x94there are new, targeted\nAPIs for each use case. All the replacement APIs are in the\n`androidComponents {}` block.\nFor more information, see https://developer.android.com/studio/releases/gradle-plugin-api-    updates#transform-api.\nTo determine what is calling android.registerTransform, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.\nAffected Modules: core\n
Run Code Online (Sandbox Code Playgroud)\n

WIS*_*SHY 23

对于陷入此问题的任何人,请将其添加android.debug.obsoleteApi=true到您的gradle.properties 这将帮助您确定哪个库导致了问题。

就我而言,这是第 3 方库造成的。