当Android Studio升级到Aretic Fox版本后,APG的版本也升级到了7.0,而gradle的版本也要随之升级到7.0了(参考官方文档)
而AndResGuard在gradle升级到7.0后会出现错误,如下
Some problems were found with the configuration of task ':app:resguardProdRelease' (type 'AndResGuardTask').
- In plugin 'AndResGuard' type 'com.tencent.gradle.AndResGuardTask' property 'android' is missing an input or output annotation.
看错误是没有适配gradle 7.0的,我们着手修改这个问题。
下载源码,按以下步骤修改
1、升级gradle版本到7.0
2、compile改为implementation
3、修改AndResGuardT

当升级Android Studio至AreticFox并更新Gradle到7.0时,AndResGuard遇到兼容性错误。为解决此问题,需要下载AndResGuard源码,升级Gradle版本,将`compile`改为`implementation`,添加`@Internal`注解到相关代码,修改版本号为1.2.22,并通过特定命令发布到本地Maven。源码已上传至GitHub,无需升级Gradle到7.0也可使用,因为`@Internal`从3.0版本起就可用。

2730

被折叠的 条评论
为什么被折叠?



