30

How can I configure IntelliJ IDEA to have Annotation processors enabled by default?

Currently, I have to enable it manually for every imported project.

enable annotation processor

6
  • Do you import the project from Maven or Gradle?
    – CrazyCoder
    Jun 9, 2017 at 9:52
  • @CrazyCoder mostly - gradle. I just want this flag to be checked by default. There should not be any issues if there are no annotation processors on classpath. Jun 9, 2017 at 9:54
  • 1
    Did you try File | Other Settings | Default Settings and enable it there before importing?
    – CrazyCoder
    Jun 9, 2017 at 9:55
  • @CrazyCoder thank you. I did not know about File | Other Settings | Default Settings. This seems to be an answer to mu question. Jun 9, 2017 at 10:01
  • IntelliJ has started asking this every time I open the IDE in 2020.2.
    – maaw
    Sep 24, 2020 at 19:17

1 Answer 1

45

Current IDE version:

File | New Project Settings | Settings for New Projects..., navigate to the compiler settings, annotation processing and enable this option before importing the project.

Previous versions:

File | Other Settings | Default Settings, navigate to the compiler settings, annotation processing and enable this option before importing the project.

5
  • 2
    After installing new Intellij 2018.2, I got the same problem. Default setting has already been set to correct value. But problem resolved only after File/Invalidate caches/Invalidate and restart
    – Geniy
    Aug 13, 2018 at 10:58
  • in 2019.1 there is no default settings anymore... so how we can achieve this?
    – Arcones
    Jul 17, 2019 at 9:36
  • 5
    @Arcones File | Other Settings | Settings for the new projects.
    – CrazyCoder
    Jul 17, 2019 at 10:07
  • 2
    there is no "Other Settings" menu under "File" menu. Does its location changed?
    – mirec
    Aug 3, 2020 at 10:25
  • 2
    It's, now, File -> New Projects Setup -> Preferences for New Projects...
    – Jin Kwon
    Feb 5, 2022 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.