gpt4 book ai didi

gradle - 遇到 gradle 构建问题

转载 作者:行者123 更新时间:2023-12-03 21:09:55 28 4
gpt4 key购买 nike

不久前,该项目的 gradle 构建运行良好,但现在一直失败并显示以下错误(带有 --info 标志的输出):

Starting process 'Gradle Test Executor 1'. Working directory: /home/abc/git/xyz Command: /usr/lib/jvm/java-8-oracle/bin/java -Djava.security.manager=jarjar.org.gradle.process.internal.child.BootstrapSecurityManager -DsysProp=value -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 -cp /home/abc/git/xyz/$PATH:/opt/abc/gradle-2.9/caches/2.9/workerMain/gradle-worker.jar jarjar.org.gradle.process.internal.launcher.GradleWorkerMain 'Gradle Test Executor 1'
Successfully started process 'Gradle Test Executor 1'
Error occurred during initialization of VM
java.lang.InternalError: Could not create SecurityManager: jarjar.org.gradle.process.internal.child.BootstrapSecurityManager
at sun.misc.Launcher.<init>(Launcher.java:106)
at sun.misc.Launcher.<clinit>(Launcher.java:57)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1448)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1433)

Starting process 'Gradle Test Executor 2'. Working directory: /home/abc/git/xyz Command: /usr/lib/jvm/java-8-oracle/bin/java -Djava.security.manager=jarjar.org.gradle.process.internal.child.BootstrapSecurityManager -DsysProp=value -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 -cp /home/abc/git/xyz/$PATH:/opt/abc/gradle-2.9/caches/2.9/workerMain/gradle-worker.jar jarjar.org.gradle.process.internal.launcher.GradleWorkerMain 'Gradle Test Executor 2'
Successfully started process 'Gradle Test Executor 2'
Error occurred during initialization of VM
java.lang.InternalError: Could not create SecurityManager: jarjar.org.gradle.process.internal.child.BootstrapSecurityManager
at sun.misc.Launcher.<init>(Launcher.java:106)
at sun.misc.Launcher.<clinit>(Launcher.java:57)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1448)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1433)

Process 'Gradle Test Executor 2' finished with non-zero exit value 1
org.gradle.process.internal.ExecException: Process 'Gradle Test Executor 2' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:367)
at org.gradle.process.internal.DefaultWorkerProcess.onProcessStop(DefaultWorkerProcess.java:91)
at org.gradle.process.internal.DefaultWorkerProcess.access$000(DefaultWorkerProcess.java:35)
at org.gradle.process.internal.DefaultWorkerProcess$1.executionFinished(DefaultWorkerProcess.java:57)
at sun.reflect.GeneratedMethodAccessor302.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy50.executionFinished(Unknown Source)
at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:214)
at org.gradle.process.internal.DefaultExecHandle.finished(DefaultExecHandle.java:312)
at org.gradle.process.internal.ExecHandleRunner.completed(ExecHandleRunner.java:103)
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:83)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

知道什么可能导致问题以及如何最好地解决它吗?

最佳答案

对于可能遇到此问题的任何其他人,我通过执行以下操作来解决:

rm -rf ~/.gradle
rm -rf YOUR_PROJECT/.gradle

我第一次尝试只是 rm -rf ~/.gradle/caches但这还不够。

关于gradle - 遇到 gradle 构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42422508/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com