I have a Gradle file which, whenever I load open it in IntelliJ IDEA 14.1.5, shows IDE errors for the entire file. Namely all the errors seem to be either:
java.
Happened to me recently on windows. I tried all of the above but it didn't work.
What i did:
1 - I had JAVA_HOME environment variable already set. So IDEA picked that as project SDK and these warnings showed up.
2 - So, i removed the default JAVA_HOME from project SDK and manually added jdk path. Restarted and all warnings were gone.
Maybe it will help someone. Thanks.