简体   繁体   English

在Android Studio 0.5.2中导入项目时未显示gradle文件

[英]No gradle file shown while importing project in android studio 0.5.2

I want to import existing project into android studio 0.5.2 . 我想将现有项目导入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 . 当我选择导入项目并转到项目时,它将显示build.gradle文件以及项目树。 following is the screenshot: 以下是屏幕截图: 在此处输入图片说明

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

创建一个新项目,并将目录“ 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. 首先,在导入android studio时,您必须选择build.gradle文件而不是项目,对于gradle主页,在我的情况下,您必须提供已安装gradle文件的位置,即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. 同样不要忘记在build.gradle文件中更改gradle版本和sdk构建工具版本,并在wrapper-properties中更改gradle版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM