gradle插件无法使用gradle

gradle插件无法使用gradle

本文介绍了intellij idea gradle插件无法使用gradle.properties中指定的相对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Gradle项目(从命令行)完美运行,配置为使用通过相对路径指定的JDK.

I have a Gradle project perfectly running (from the command line), configured to use a JDK specified with a relative path.

为此,我向项目添加了gradle.properties文件,其中包含:

For this, I added a gradle.properties file to my project, containing:

org.gradle.java.home = jdk/

但是当我尝试从Intellij Idea(14.0.3)运行构建时,我得到了:

But when I try to run the build from Intellij Idea (14.0.3), I get:

Java home supplied via 'org.gradle.java.home' is invalid. Invalid directory: jdk/

使用绝对路径可以解决此问题.我会滥用gradle.properties还是只需要向Jetbrains报告与它们的Gradle插件有关的错误?

Using absolute paths solves the issue. Do I misuse the gradle.properties or I just have to report a bug to Jetbrains, related to their Gradle plugin?

推荐答案

这是IntelliJ的Gradle插件的一个已知问题,您可以在其问题跟踪器中对其进行投票: https://youtrack.jetbrains.com/issue/IDEA-208432

This is a known issue with IntelliJ's Gradle plugin, which you can upvote in their issue tracker here: https://youtrack.jetbrains.com/issue/IDEA-208432

这篇关于intellij idea gradle插件无法使用gradle.properties中指定的相对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 10:00