摇篮建立与Android Studio的错误 [英] Gradle build errors with Android Studio
问题描述
当我尝试建立我的项目在Android的工作室,我得到了下面的错误,使用随下载的摇篮插件(V 1.6):
When I try to build my project in Android Studio I get the following error, using the gradle plugin provided with the download (v 1.6):
指定的摇篮安装不支持此工具API版本(1.6,协议版本4)
当我降级到摇篮1.3,1.4或1.5,我得到这个错误:
When I downgrade to gradle 1.3, 1.4 or 1.5, I get this error:
摇篮:抛出java.lang.ClassNotFoundException:org.gradle.tooling.provider.model.ToolingModelBuilderRegistry
该项目在Eclipse最初创建,使用打造摇篮文件
选项导出,然后导入到Android的工作室。
The project was originally created in Eclipse, the exported using the build gradle file
option, then imported into Android Studio.
有谁知道我能做些什么来解决这些问题?非常感谢。
Does anyone know what I can do to fix these issues? Many thanks.
推荐答案
我认为这个问题是与Eclipse 22出口项目的方式。最后我得到了我的项目调过来的方式是建立在Android中Studio中的一个新项目,并复制了从我的Eclipse项目中的文件到相应的目录,在新的项目。
I think the problem is with the way Eclipse 22 exports the project. In the end the way I got my project transferred over was to create a new project in Android Studio and copy over the files from my Eclipse project into the appropriate directories in the new project.
在Android的Studio项目的目录结构有很大的不同在Eclipse的结构,也有当你开始一个新的项目,在导入从Eclipse的一个项目时,不要创建多个文件(如gradlew.bat, settings.gradle)。
The directory structure of projects in Android Studio is very different to the structure in Eclipse, and there are several files created when you start a new project which you don't get when importing a project from Eclipse (e.g. gradlew.bat, settings.gradle).
这篇关于摇篮建立与Android Studio的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!