android 33 升级踩坑 2

遇到问题

升级完 gradle 相关配置后,编译提醒 java 编译异常
An exception has occurred in the compiler (1.8.0_271). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
06:54:28 java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.UnsharedNameTable$NameImpl)

一直以为是gradle 版本不匹配导致,进入误区。根本原因是因为,编译依赖的JDK 版本不匹配导致。
android 33
gradle-build-tool :3.6.4
gradle-wrapper.properties 版本最低需要 5.6.4

如果使用android studio 需要勾选gradle jdk 配置
file-->settings-->Build,Execution,Deployment-->build Tools-->Gradle-->Gradle JDK
JDK 安装路径 xx\xx\xx\jdk-11.0.17
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值