我的构建脚本遇到错误(如下)。有没有一种方法可以使用与使用 -verbose:class
调用 Java 相同类型的输出来运行 Gradle?
有问题的错误,如果有人有一些意见:
Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':Project:compile'.
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.wrapException(ErrorHandlingArtifactDependencyResolver.java:49)
... more
Caused by: java.lang.LinkageError: loader constraints violated when linking org/apache/ivy/core/module/descriptor/DependencyDescriptor class
最佳答案
你可以设置如下环境变量,我相信...
GRADLE_OPTS="$GRADLE_OPTS -verbose:class"
然后调用gradle
。阅读此 link .
Once Gradle is downloaded and unzipped, the environment variable GRADLE_HOME can be set to the directory of the unzipped Gradle installation and the PATH should be set to $GRADLE_HOME/bin or %GRADLE_HOME%\bin. The Gradle installation page tells us that JVM options used by Gradle can be set via either GRADLE_OPTS or JAVA_OPTS. The Grade installation and configuration in the path can be confirmed by running gradle -v at the command line once the environment variable settings are sourced.
关于java - 使用详细的类加载运行 Gradle?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15578072/