Answer the question
In order to leave comments, you need to log in
How to set up Intellij IDEA with gradle?
Hello! Today I started to deal with gradle. Created a project with gradle init, imported this project into intellij IDEA. I have a simple Java application written in JavaFX. The problem is that after redesigning the project in gradle, the syntax of java files stopped highlighting for me and auto-completion does not work. The development environment looks like this:
Also, the icons of the java files have changed to some strange ones ...
What did I do wrong and how to return the syntax highlighting? Thank you!
Answer the question
In order to leave comments, you need to log in
The problem was solved by reconfiguring the paths in the project settings on the modules tab.
Attach your Build.gradle file. I'll show you how to do it. Or add this code to your config file.
sourceSets {
main.java.srcDirs = ['src']
main.resources.srcDirs = ['src']
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question