Using IntelliJ's Gradle import is an alternative to generating IntelliJ files with gradle idea
. They are not supposed to be used together.
IntelliJ IDEA 13.0.1 can not resolve all Gradle classes
-
13-10-2022 - |
Вопрос
I created Gradle project with IntelliJ 13.0.1 and after
gradle cleanIdea Idea
starts to appear errors in my code. But when I start tasks everything works fine. So why IntelliJ can not find for example this org.gradle.api.file.FileTree? How to fix it?
Решение
Другие советы
Just in case it helps someone: I had the same problem, but in my case the reason was that the GRADLE_USER_HOME environment variable was not set. I was using the default Gradle wrapper, which uses this variable to locate the Gradle libraries. Strangely, the build itself worked fine - the problems were only in the editor window, and when trying to open Gradle sources.
In short, make sure GRADLE_USER_HOME correctly points to your user's .gradle directory (not the one in your project).