Question

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?

enter image description here

Was it helpful?

Solution

Using IntelliJ's Gradle import is an alternative to generating IntelliJ files with gradle idea. They are not supposed to be used together.

OTHER TIPS

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top