我调用 Guava 30.0-jre 的API 的代码如下:
public static void main(String[] args) {
int i = Ints.tryParse(args[0]);
Preconditions.checkArgument(i > 0, "Argument was %s but expected nonnegative", i);
}
用 Gradle 5.6.4 构建的代码在 Intellij 上执行,报如下错误,但其他代码执行正常。
Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
同时,这块代码用Maven构建,在Intellij上执行,也是正常的。
请教下,这是Gradle 5.6.4的bug,还是其他的原因呢?