IntelliJ IDEA and Gradle - Cannot be applied to '(groovy.lang.Closure)'

后端 未结 8 584
感情败类
感情败类 2021-02-03 17:09

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.

8条回答
  •  情深已故
    2021-02-03 17:31

    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.

提交回复
热议问题