study notes
  • Introduction
  • Oct 14, 2016
  • Oct 22, 2016
  • Oct 27
  • Nov1
  • j2ee context root(4.19.2017)
  • June 20, 2017(bTrade debug record)
  • Sep 5, 2017
  • Jan 4, 2018
  • Jan 5, 2018Deploy war file to Tomcat
  • Jan 13,2018, hibernate config
  • conflict caused by PR
  • using another project's class
  • intellij cannot resolve the symbols in target folder
  • keyboard symbol
  • Oct 31, 2018
  • tax build construction simplify &effecticent
  • line ending
  • memory leak
  • Serializable
  • To learn
  • What happens when you type 'google.com' into a browser and press Enter?
  • security scan for software
Powered by GitBook
On this page

Was this helpful?

intellij cannot resolve the symbols in target folder

Previoususing another project's classNextkeyboard symbol

Last updated 5 years ago

Was this helpful?

In IntelliJ, find the folder that the generated code goes in. This is controlled by settings on the same dialog as where you set up the annotation processing. Right click on that folder, find "Mark Directory As" in the context menu, and choose "Generated Sources Root".

After doing this, IntelliJ will recognize and handle the generated classes normally. It will also give a compile warning that an output path intersects with a source root, but that's reasonably ignorable. I haven't been able to find a way to get rid of that warning without also leaving the generated classes unrecognized.

  • I'm encountering the same issue, but my generated folders for annotation processing do not have the Right Click "Mark Directory As" option because they are Excluded by default in Project Structure - > Modules. It is not possible for me to unmark them as Excluded or to mark them as anything else...

  • I would guess your generated code folder is actually a subfolder of what the exclusion marking is on. You can either change where your generated code goes through the annotation processing settings, or unmark the parent folder (you will then want to exclude each of its subfolders other than the one for generated code).

https://stackoverflow.com/questions/34188732/get-intellij-to-recognize-classes-generated-by-annotationprocessor