What does this symbol mean in IntelliJ? (red circle in the lower left corner of the file name, in it is "J")

In the target folder in IntelliJ for the Java project that I created, I have several java source files in the package. Next to each file, the “J” icon has a red circle with a line through it.

What does it mean? How to fix it?

+116
java intellij-idea target
Feb 04 2018-11-23T00:
source share
13 answers

You need to specify the source directory

File> Project Structure > Modules 

click the directory and click the "Sources" button

This is strange because it is usually done automatically. Perhaps this is better if you re-create the project.

+156
Feb 05 2018-11-11T00:
source share

If this is a maven project

  • right click on pom.xml
  • Add as Maven Project

thank

+42
Feb 03 '16 at 14:35
source share

The first answer from the incontrovertible above that starts with “you need to specify the source of dir” is correct, but I don’t see it telling you an easy way to do this.

Just right-click the java source files folder (for example, "java" in the src / main / java directory if it is a Maven project) and select "Mark directory as> Source Root" (see screenshot below).

enter image description here

+25
Dec 01 '17 at 12:11
source share

This situation occurs when the IDE searches for the src folder and cannot find it in the path. Select the project root (F4 in the windows)> Go to the "Modules on the side tab"> "Select sources"> select the appropriate folder with the source files in it> Click the icon of the blue sources icon (to add sources)> Click the "Green test sources" folder "(to add Unit test folders).

+7
Mar 09 '14 at 7:21
source share

Find all the IntelliJ characters (v15) here: https://www.jetbrains.com/idea/help/symbols.html

This site indicates that this icon means "Java class located from the source root." For more information, see the "Configuring Content Roots" section.

+3
Nov 25 '15 at 10:15
source share

Press F4 in the root directory and select the root source by pressing the source button. He solved my problem!

 for(; ;){ makeGoodCode(); } 
+2
Jan 06 '16 at 9:17
source share

Another option if you use Flavors in Android Studio:

Click Create → Choose Build Option.

In the list, select the option in which you work, and it will turn green, and the rest will have red J.

+2
May 30 '17 at 17:05
source share

This means that these files are not part of the project settings.

0
Feb 04 2018-11-11T00:
source share

I downloaded the project from github with a .idea folder. After deleting this folder, everything was in order.

0
Dec 01 '14 at 14:25
source share

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

0
May 31 '16 at 13:58
source share

Perhaps your project was not an android project from android studio, please make sure that the “android support” plugin is enabled (Android Studio Settings → Plugins → Choose Android Support)

0
Jul 18 '18 at 5:09
source share

As mentioned earlier,

  1. right click on pom.xml

enter image description here

  1. Add as Maven Project

enter image description here

0
Apr 28 '19 at 15:42
source share

Close Android Studio, delete the .idea and .gradle folders from the project structure and run Studio again.

0
Jun 18 '19 at 14:24
source share



All Articles