执行gradlew.bat遇NoClassDefFoundError及Gradle缓存问题求助
Gradle执行gradlew.bat时的系列错误排查问题
初始错误
执行gradlew.bat时触发以下错误:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper > Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache [in thread "Daemon worker"]
已尝试的操作及后续问题
修改
gradle-wrapper.properties中的distributionUrl配置:
原内容:distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-bin.zip修改为:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip重新执行后出现新错误:
A problem occurred configuring root project 'nexus-deploy'. > Could not open cp_proj remapped class cache for s5e1jtxdcnwfq13zlj7qke7c删除Gradle缓存目录下的
scripts和scripts-remapped文件夹,问题未解决。执行命令
./gradlew clean,仍出现相同缓存错误:* What went wrong: A problem occurred configuring root project 'nexus-deploy'. Could not open cp_proj remapped class cache for s5e1jtxdcnwfq13zlj7qke7c
环境信息
- Java版本:
1.8.0_341 - Gradle版本:
7.5.1
内容的提问来源于stack exchange,提问作者Barry
相关产品推荐
相关产品推荐

