在运行Gradle构建时,测试失败。
PS:
1. Gradle正在使用正确的JDK(1.6)来构建。
我用JDK 1.7试过这个,同样的错误也来了。
3.当我在linux / windows上本地构建(使用JDK 1.6)时,我没有看到这个错误
机器,但其中一台机器给我这个错误。
我的
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
答案 0 :(得分:2)
这是一个内部错误。最好的机会是使用最新的Gradle版本。