开发时正常,打包时提示 错误:找不到符号
,是找不到get/set方法。
版本
- IDEA:2019.3
- Gradle:6.7.1
- Lombok:1.18.16
解决过程
-
尝试1:升级了Lombok插件,无果
-
核实Enable annotation processing已勾选
File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors
-
核实Use complier为Javac
File -> Settings -> Build, Execution, Deployment -> Java Compiler
-
修改build.gradle依赖,解决!
// 需要配置下面两条 compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.16' annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.16'
来源:oschina
链接:https://my.oschina.net/u/3251146/blog/4938478