使用build.gradle文件中的Eclipse项目到Android的工作室导入失败 [英] Import of Eclipse project into Android Studio using build.gradle file fails

查看:189
本文介绍了使用build.gradle文件中的Eclipse项目到Android的工作室导入失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图导入使用build.gradle文件我的基于Eclipse的Andr​​oid项目。我得到以下信息:未能找到生成工具版本18.0.0。然而,根据Android SDK的经理,我有Android SDK中内建工具18.0.1安装。

I'm trying to import my Eclipse based Android project using the build.gradle file. I get the following message: "failed to find Build Tools revision 18.0.0". However, according to the Android SDK Manager, I have Android SDK Build-tools 18.0.1 installed.

我做的这一切在64位的Windows 7机器上,如果这是相关的。

I am doing all this on a 64-bit Windows 7 machine, if that's relevant.

我该如何解决这个问题?

How do I fix this?

更新:我居然只更新到内置工具18.0.1今天上午。然后我注意到,使得Android的Studio中的一个新项目时,它不会让我创建采用Android 4.3(4.2.2是最新的版本允许)的项目。我试图丢弃我的项目的目标版本到Android 4.2.2,并重新将其导出。现在,机器人工作室抱怨不能够找到内置工具18.0.1当我尝试导入该项目。

UPDATE: I actually only updated to Build-tools 18.0.1 this morning. I then noticed that, when making a new project in Android Studio, it wouldn't allow me to create a project using Android 4.3 (4.2.2 was the latest allowable version). I tried dropping the target version of my project to Android 4.2.2, and re-exporting it. Now Android Studio complains about not being able to find Build-tools 18.0.1 when I try to import this project.

推荐答案

我是一个机器人工作室的处女过,直到11分钟前。我遇到了同样的问题。如果签入的Andr​​oid Studio中的SDK管理器(或者Eclipse我相信)它会显示已安装的工具。我/失踪构建工具18.0.1过,并得到错误....但它是因为我还没有安装的话。

I was an Android Studio virgin too up until 10 minutes ago. I ran into the same problem. If you check your SDK Manager in Android Studio (or Eclipse I believe) it will show which tools you have installed. I am/was missing build tools 18.0.1 too and getting the error....but it was because I hadn't installed them.

因此,没有修改的摇篮构建文件,我能够安装使用SDK管理器的构建工具,并得到一切正常运行。

So without modifying the Gradle build files, I was able to install the build tools using the SDK Manager and get everything up and running.

请参阅本图片:

See this image:

顺便说一句,我也有更新的API版本,以及因为它选择的是未安装的API版本(我不明白,因为这是当我使用Eclipse编译)。

As an aside, I also had to update the API version as well because it selected an API version that wasn't installed (which I don't get because it was when I compiled with Eclipse).

希望这有助于。

这篇关于使用build.gradle文件中的Eclipse项目到Android的工作室导入失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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