Agconnect – API ‘android.registerTransform’ 已移除

huangapple go评论71阅读模式
英文:

Agconnect - API 'android.registerTransform' is removed

问题

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

那么,除了回退到Gradle 7之外,是否有其他解决方案?

在项目':app'上应用插件时出现问题。
> 无法应用插件'com.huawei.agconnect'。
   > API 'android.registerTransform'已被删除。

     有关更多信息,请参阅https://developer.android.com/studio/releases/gradle-plugin-api-updates#transform-api。
     要确定是什么调用了android.registerTransform,请在命令行上使用-Pandroid.debug.obsoleteApi=true以显示更多信息。

<details>
<summary>英文:</summary>

After migrating to gradle 8.x, I can&#39;t build the app because the latest Huawei AppGallery dependency  ```com.huawei.agconnect:agcp:1.9.0.300``` still not compatible with gradle 8.

So is there any solutions other than reverting to 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.


</details>


# 答案1
**得分**: 3

终于在[这里](https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-common-faq-0000001063210244#section17273113244910)找到了解决方案。

只需将此属性添加到 ```gradle.properties``` 文件中:
```apmsInstrumentationEnabled=false```

<details>
<summary>英文:</summary>

Finally I found the solution [here](https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-common-faq-0000001063210244#section17273113244910)..

Just add this property to ```gradle.properties```

apmsInstrumentationEnabled=false


</details>



huangapple
  • 本文由 发表于 2023年7月12日 20:27:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76670525.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定