gpt4 book ai didi

Android Studio 无法加载类 'org.codehaus.groovy.runtime.typehandling.ShortTypeHandling'

转载 作者:IT老高 更新时间:2023-10-28 23:23:44 26 4
gpt4 key购买 nike

我安装了 Android Studio,当我尝试从 gradle 导入项目时,会出现此 解决错误:

Unable to load class 'org.codehaus.groovy.runtime.typehandling.ShortTypeHandling'.

我删除了我的 Users .gradle 文件夹中的文件并尝试了不同的 gradle 版本。我不知道如何解决这个问题。

最佳答案

This页面可能有助于解决问题。他们说的是:

So we leveraged this version to add a new artifact, named groovy-backports-compat23. This artifact shouldn’t be necessary for most of you, but if you face an error like:

Caused by: java.lang.ClassNotFoundException:
org.codehaus.groovy.runtime.typehandling.ShortTypeHandling at
java.net.URLClassLoader$1.run(URLClassLoader.java:372)

in your project, then it means that a class has been compiled with Groovy 2.3+ but that you are trying to use it with an older version of Groovy. By adding this jar on classpath, you give a chance to your program to run. This may be particularily interesting for Gradle users that want to use a plugin built on Gradle 2+ on older versions of Gradle and face this error. Adding the following line to their build files should help:

buildscript {
// ...
dependencies {
classpath 'some plugin build on gradle 2'
classpath 'org.codehaus.groovy:groovy-backports-compat23:2.3.5'
} }

Note that for now, this jar only contains the ShortTypeHandlingClass. Future versions may include more. - See more at: http://glaforge.appspot.com/article/groovy-2-3-5-out-with-upward-compatibility#sthash.mv7Y8XQv.dpuf

关于Android Studio 无法加载类 'org.codehaus.groovy.runtime.typehandling.ShortTypeHandling',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29358825/

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