简体   繁体   中英

Problems compiling in Lombok IntelliJ - mac, annotations enabled

I have the latest lombok.jar with plugin installed, downloaded and put it in libs in my project, setting up annotations via Preferences -> Build, Execution, Deployment -> Compiler -> Annotation Processors -> Enable annotations

I am also running Android Annotations, with those annotation processing paths set specifically towards to the androidannotations-api-3.2.jar

Concerning the project, it is a clean import of a 1 year project that's not from eclipse/maven/gradle, and so it doesn't have gradle/maven with it. It is running on Java8 using Android SDK22.

The errors in compilation that I am getting as an example:

Error:(39, 16) java: cannot find symbol
  symbol:   method getName()
  location: variable p of type com.example.Property

I've recently switched from eclipse to IntelliJ, the project can be compiled on Eclipse but I think I am missing something with IntelliJ, thoughts?

The answer to this question is making sure your project is structured in what gradle specifies, there are a multitude of answers here that will help provide you this information. Importing annotations as a dependency will also remove a lot of restrictions you may set on the project end.

Secondly, on the run configurations of the application, make sure that you add the "_" as your activity you plan on running because it has been annotated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM