我有一个使用lombok的基于Gradle的项目.我已将此项目导入IntelliJ IDEA 14.1(使用导入外部模型导入方法).我可以在Gradle中没有问题地运行JUnit4单元测试,但IntelliJ似乎在看到Lombok生成的Getters时遇到了问题.这使我无法在IDEA中运行测试.
为了确保它不是一个设置问题,我创建了一个非常简单的项目,并确认在简单的测试项目中出现了同样的问题.
我的版本:Gradle:gradle-2.3-all通过Gradle包装器
Intellij IDEA:IU-141.713
Lombok插件:0.9.2
我在这里错过了什么?
更新通过看不出我的意思是身体不可见.我是说这个:
/home/meeee/workspace/junit-lombok-idea/lib/src/main/java/com/example/jumbokea/Main.java
Error:(10, 11) java: cannot find symbol
symbol: method setIntField(int)
location: variable sc of type com.example.jumbokea.SomeClass
Error:(12, 41) java: cannot find symbol
symbol: method getIntField()
location: variable sc of type com.example.jumbokea.SomeClass
Error:(14, 33) java: constructor AnotherClass in class com.example.jumbokea.AnotherClass cannot be applied to given types;
required: no arguments
found: float,com.example.jumbokea.SomeClass
reason: actual and formal argument lists differ in length
Error:(16, 46) java: cannot …Run Code Online (Sandbox Code Playgroud)