无法初始化类org.codehaus.groovy.runtime.InvokerHelper

huangapple 未分类评论47阅读模式
英文:

Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

问题

我尝试使用Android Studio构建项目并运行应用程序,它在Android Studio中正常工作,但当我尝试使用终端命令进行相同操作时,出现以下错误。

构建失败:遇到异常。

  • 出现了什么问题:
    无法初始化类org.codehaus.groovy.runtime.InvokerHelper

我看到了一些其他答案,但都建议升级JDK,我已经升级了,但没有成功。

我正在使用JDK:Java 14 2020-03-17

Gradle版本:5.6.4

英文:

I tried to build my project and run the app using Android studio and it works fine but when I tried the same using terminal command, it gave me below error.

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

I saw some other answers but all suggest to upgrade the JDK which I already did but no luck

I am using jdk : java 14 2020-03-17

Gradle version : 5.6.4

答案1

得分: 0

根据这个回答:

#8613355

 gradle/wrapper/gradle-wrapper.properties

中升级你的 Gradle 版本将解决你的问题。

英文:

According to this answer;

#8613355

upgrading your Gradle version in the

 gradle/wrapper/gradle-wrapper.properties

will solve your problem.

huangapple
  • 本文由 发表于 2020年4月7日 17:03:10
  • 转载请务必保留本文链接:https://java.coder-hub.com/61076382.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定