KaptJavaCompiler cannot access JavaCompiler
class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler cannot access class com.sun.tools.javac.main.JavaCompiler
Reason

Kapt Plugin not compatible with JDK version

Solution
  • force allow illegal access of gradle apis

  • use JDK version less than 16

Allow Illegal Access

open global gradle properties file

open ~/.gradle/gradle.properties

add this property

org.gradle.jvmargs=--illegal-access=permit

rebuild project

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部