在Android Studio 0.5.2中导入项目时未显示gradle文件 [英] No gradle file shown while importing project in android studio 0.5.2

查看:64
本文介绍了在Android Studio 0.5.2中导入项目时未显示gradle文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将现有项目导入android studio 0.5.2.当我选择导入项目并转到项目时,它将显示build.gradle文件以及项目树.以下是屏幕截图:

I want to import existing project into android studio 0.5.2 . When i select import project and go to the project it displays the build.gradle file along with project tree . following is the screenshot:

但是,当我选择项目时,它要求我提供到gradle主页的链接,当我手动给出它时,它给我错误-位置不正确",并且在那里我没有得到build.gradle文件供选择.(在这种情况下,上面的build.gradle)文件没有显示.我如何使其工作?

But when i select project it asks me to give link to the gradle home and when i give it manually it gives me error-"location not correct" and i don't get build.gradle file there for selection.(In this case the above build.gradle) file is not shown.How can i make it work??

推荐答案

对不起,这是我的错误.希望对其他有相同问题的人有所帮助.首先,在导入android studio时,您必须选择build.gradle文件而不是项目,对于gradle主页,在我的情况下,您必须提供已安装gradle文件的位置,即c:\ androidstudio \ plugins \ gradle.同样不要忘记在build.gradle文件中更改gradle版本和sdk构建工具版本,并在wrapper-properties中更改gradle版本.

Sorry it was my mistake .Hope it helps others with the same problem . First of all you have to select the build.gradle file and not the project while importing into android studio and for the gradle home you have to give the location of the installed gradle file in my case it was c:\androidstudio\plugins\gradle. Also do not forget to change the gradle version and sdk build tools version in build.gradle file and change version of gradle in wrapper-properties.

这篇关于在Android Studio 0.5.2中导入项目时未显示gradle文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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