每次我进行gradle构建或./gradlew构建时,我都会得到ArrayIndexOutOfBoundsException
这是堆栈跟踪:
Exception is:
org.gradle.process.internal.ExecException: A problem occurred waiting for process 'Gradle build daemon' to complete.
at org.gradle.process.internal.DefaultExecHandle.execExceptionFor(DefaultExecHandle.java:231)
at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:209)
at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:355)
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:85)
at org.gradle.internal.operations.CurrentBuildOperationPreservingRunnable.run(CurrentBuildOperationPreservingRunnable.java:38)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -2065175016
at java.lang.String.regionMatches(String.java:1287)
at java.text.DecimalFormat.applyPattern(DecimalFormat.java:3376)
at java.text.DecimalFormat.<init>(DecimalFormat.java:464)
at sun.util.locale.provider.NumberFormatProviderImpl.getInstance(NumberFormatProviderImpl.java:180)
at sun.util.locale.provider.NumberFormatProviderImpl.getNumberInstance(NumberFormatProviderImpl.java:149)
at java.text.NumberFormat.getInstance(NumberFormat.java:875)
at java.text.NumberFormat.getInstance(NumberFormat.java:861)
at java.text.NumberFormat.getNumberInstance(NumberFormat.java:469)
at java.util.Scanner.useLocale(Scanner.java:1186)
at java.util.Scanner.<init>(Scanner.java:540)
at java.util.Scanner.<init>(Scanner.java:563)
at org.gradle.launcher.daemon.bootstrap.DaemonOutputConsumer.start(DaemonOutputConsumer.java:50)
at org.gradle.process.internal.DefaultExecHandle$CompositeStreamsHandler.start(DefaultExecHandle.java:423)
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:74)
... 7 more
所有项目都在发生这种情况。我在Ubuntu系统上。
我的gradle -v输出是
------------------------------------------------------------
Gradle 4.10.1
------------------------------------------------------------
Build time: 2018-09-12 11:33:27 UTC
Revision: 76c9179ea9bddc32810f9125ad97c3315c544919
Kotlin DSL: 1.0-rc-6
Kotlin: 1.2.61
Groovy: 2.4.15
Ant: Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM: 1.8.0_181 (Oracle Corporation 25.181-b13)
OS: Linux 4.4.0-137-generic amd64