Agconnect - API“android.registerTransform”已删除

Mah*_*Aly 7 android huawei-developers

迁移到 gradle 8.x 后,我无法构建应用程序,因为最新的华为 AppGallery 依赖项 com.huawei.agconnect:agcp:1.9.0.300仍然与 gradle 8 不兼容。

那么除了恢复到 gradle 7 之外还有其他解决方案吗?

A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.huawei.agconnect'.
   > 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.
Run Code Online (Sandbox Code Playgroud)

Mah*_*Aly 7

最后我在这里找到了解决方案..

只需将此属性添加到gradle.properties

apmsInstrumentationEnabled=false
Run Code Online (Sandbox Code Playgroud)

  • 解决方案1:将插件更新到1.9.1.300或更高版本。 (2认同)