Gradle Java堆大小错误

时间:2018-08-20 18:46:05

标签: java gradle java-8 heap

每当我尝试在 any 项目上执行 any gradle命令时,我都会得到:

FAILURE: Build failed with an exception.

* What went wrong:
Java heap space

我尝试在非项目上下文中更改Java堆并执行gradle命令,但遇到相同的错误。例如:

$ killall java
$ mkdir test
$ cd test 
$ export _JAVA_OPTIONS=-Xmx4096m
$ gradle wrapper
Picked up _JAVA_OPTIONS: -Xmx4096m

FAILURE: Build failed with an exception.

* What went wrong:
Java heap space

Gradle版本为4.8

$ java -version
Picked up _JAVA_OPTIONS: -Xmx4096m
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

编辑 重新启动系统后,问题似乎消失了。无法再复制

0 个答案:

没有答案