Android的工作室无法加载类的组织。codehaus.groovy.runtime.typehandling.ShortTypeHandling“ [英] Android Studio Unable to load class 'org.codehaus.groovy.runtime.typehandling.ShortTypeHandling'

查看:377
本文介绍了Android的工作室无法加载类的组织。codehaus.groovy.runtime.typehandling.ShortTypeHandling“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Android的工作室,当我尝试导入的gradle从一个项目,这个的解析错误的显示出来:

I installed Android Studio and when I try to import a project from gradle this resolve error shows up:

无法加载类
  组织。codehaus.groovy.runtime.typehandling.ShortTypeHandling。

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

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

I deleted the files in my Users .gradle folder and tried different gradle versions. I don't know how to fix this.

推荐答案

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

This page might help solve the problem. What they say is:

所以我们利用这个版本增加了新的神器,命名
  Groovy的反向移植,compat23。此工件不应该是必要的
  你们中的大多数,但如果你面对类似的错误:

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)

在您的项目,那么就意味着一类已编译
  Groovy的2.3+但您要使用旧版本的使用
  Groovy的。通过添加在类路径这个罐子,你给一个机会,你的
  程序运行。这可以是用于摇篮用户particularily有趣
  希望使用内置的摇篮插件2+在旧版本
  摇篮,面对这个错误。将下面的行自己的版本
  文件应该有所帮助:

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'
    } }

请注意,就目前而言,这个罐子只包含ShortTypeHandlingClass。
  未来版本可能会包括更多。
   - 多见于:<一href=\"http://glaforge.appspot.com/article/groovy-2-3-5-out-with-upward-compatibility#sthash.mv7Y8XQv.dpuf\">http://glaforge.appspot.com/article/groovy-2-3-5-out-with-upward-compatibility#sthash.mv7Y8XQv.dpuf

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的工作室无法加载类的组织。codehaus.groovy.runtime.typehandling.ShortTypeHandling“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆