1

在运行 Gradle 构建时,测试失败。

PS:

1. Gradle 使用正确的 JDK (1.6) 构建。
2.我用JDK 1.7试过这个,同样的错误也出现了。
3. 当我在 linux/windows 4. 机器上本地构建它(使用 JDK 1.6)时,我没有看到这个错误,
但是其中一台机器给了我这个错误。

我的?s
1. 可以做些什么来修复 com.esotericsoftware.kryo.KryoException:缓冲区溢出错误。
2. 为什么 Gradle 进程失败,即使 build.gradle 中的测试部分说:

   test {

        ignoreFailures=true
        //more code here for test section...
        //..
   }

任何提示/帮助表示赞赏。错误快照如下所示:

:test
Unexpected exception thrown.
org.gradle.messaging.remote.internal.MessageIOException: Could not read message from '/0:0:0:0:0:0:0:1:53371'.
        at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:88)
        at org.gradle.messaging.remote.internal.hub.MessageHub$ConnectionReceive.run(MessageHub.java:230)
        at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: com.esotericsoftware.kryo.KryoException: Buffer underflow.
        at com.esotericsoftware.kryo.io.Input.require(Input.java:162)
        at com.esotericsoftware.kryo.io.Input.readByte(Input.java:255)
        at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:64)
        at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:53)
        at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:83)
        ... 5 more
> Building > :test > 84 tests completed
:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> Process 'Gradle Worker 6' finished with non-zero exit value 139

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
4

1 回答 1

2

这是一个内部错误。最好的机会是尝试使用最新的 Gradle 版本。

于 2014-11-04T05:09:49.053 回答