IntelliJ Gradle Plugin: The supplied javaHome seems to be invalid

前端 未结 14 714
暗喜
暗喜 2020-12-23 08:41

Similar to:
- Intellij 14 the supplied javaHome seems to be invalid
- Android Studio - supplied javaHome is not a valid folder

However, I am trying to use

14条回答
  •  暖寄归人
    2020-12-23 09:29

    I've solved this issue by putting gradle.properties file in the same dir as build.gradle with exact path to my JDK:

    org.gradle.java.home = C:/Dev/JDK
    

    Actually it is not a correct solution, probably it should be fixed in IDE, I see in IDEA logs something like (when I executing gradle task of already imported project):

    INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:/Dev/JDK
    

    But when I going to import gradle module to the project I don't see such kind of message, probably IDEA passes link to bundled JRE which is actually not a JDK.

提交回复
热议问题