相关疑难解决方法(0)

gradle在Intellij中不起作用 - 与JAVA_HOME有关

  • 我可以从命令行运行gradle来查看它的版本.
  • 我可以在IntelliJ(版本10.0或版本10.2)中运行,编译和调试grails应用程序
  • 我安装了IntelliJ Gradle插件.

每当我尝试使用Intellij中的gradle做任何事情时,我都会收到如下错误:

Executing command: "tasks"
Failed to connect to gradle process for command 'tasks'

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.0\jre

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Run Code Online (Sandbox Code Playgroud)

但是在我的环境中,我已经JAVA_HOME在不同的目录中设置了正确的JDK.此外,当我查看IntelliJ项目时,它还会在正确的JDK位置显示JDK.我找不到任何试图将JDK指向Intellij JRE位置的东西.

有什么想法吗?

intellij-idea gradle

27
推荐指数
2
解决办法
3万
查看次数

标签 统计

gradle ×1

intellij-idea ×1