What does this symbol mean in IntelliJ? (red circle on bottom-left corner of file name, with 'J' in it)

后端 未结 19 1080
栀梦
栀梦 2020-11-29 18:52

Under the target folder in IntelliJ for a Java project I created, I have a few java source files in the package. Beside each file the \'J\' icon has a red circle with a lin

相关标签:
19条回答
  • 2020-11-29 19:29

    It means your Java source files aren't part of the project.

    If the suggestions mentioned here don't resolve the issue, you may have hit a rare bug like I did. Researching the exceptions found in the log helped me. In my case, disabling the "Plugin DevKit", deleting the .idea directory, and reimporting the project worked.

    0 讨论(0)
  • 2020-11-29 19:31

    mark the java folder as source root.It will solve.

    0 讨论(0)
  • 2020-11-29 19:31

    For a gradle project "./gradlew --stop" will help to resolve the problem when the source directory is correctly specified and project is properly synced.

    0 讨论(0)
  • 2020-11-29 19:32

    As mentioned earlier,

    1. right click on the pom.xml

    1. Add As Maven Project

    0 讨论(0)
  • 2020-11-29 19:32

    This is what worked for me

    1. Press File from the toolbar
    2. Press Sync Project with Gradle Files
    0 讨论(0)
  • You need to specify the source dir

    File> Project Structure > Modules
    

    click the directory and click the Sources button

    It's weird because usually it's done automatically. Maybe it's better if you recreate the project again.

    0 讨论(0)
提交回复
热议问题