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
First mark the directory as the source root. Then go to the pom excel and right click on it. select add as maven project .
Another option if you're using Flavors in Android Studio:
Click Build -> Select Build Variant.
In the list click the variant you're working in and it will turn green and the others will have the red J.
Actually this can happens because of two reason.
Your project not getting/ Updating your dependencies. Go to your terminal and enter mvn clean install. Or right click on pom.xml and click Add as Mevan Project.
Check your jdk has set properly to the project.
This situation happens when the IDE looks for src folder, and it cannot find it in the path. Select the project root (F4 in windows) > Go to Modules on Side Tab > Select Sources > Select appropriate folder with source files in it> Click on the blue sources folder icon (for adding sources) > Click on Green Test Sources folder ( to add Unit test folders).
Press F4 at the project root and select the the root source pressing the source button. It resolved my problem!
for(; ;){
makeGoodCode();
}
Close Android Studio and delete .idea and .gradle folder from project structure and start Studio again.