简体   繁体   English

如何将现有的android项目(build.gradle)打开到android studio中

[英]How to open existing android project(build.gradle) into android studio

I am new to Android Studio .I have an existing android project which was build from android studio. 我是Android Studio新手。我有一个从android studio构建的现有android项目。 now I need to open that project from build.grade(that project's file)file.I followed this step File-->Open-->build.gradle(from that existing project) 现在我需要从build.grade(该项目的文件)文件中open该项目。我按照以下步骤操作- >打开 - > build.gradle(来自该现有项目)
But it shows the processing window as below image for so Long time doesn't responding well. 但它显示处理窗口如下图像所以很长时间没有很好的响应。

So any one have idea about this please help me. 所以任何人都有这个想法,请帮助我。

在此输入图像描述

First, we need your build.gradle 首先,我们需要你的build.gradle

Second, i can make a guess from what you have posted till now. 其次,我可以猜测你到目前为止所发布的内容。

  • Check your build.gradle for unused or missing projects in your project directory by checking dependencies area 通过检查依赖项区域,检查build.gradle中项目目录中未使用或缺少的项目

as i can understand from " error listing versions of com.android.support:support-v4 using class org.gradle.api.internal.artifacts.repositories.resolver.MavenVersionLister$1. will attempt an alternate way to list versions. This behaviour has been deprecated and is scheduled to be removed in gradle 2.0 " this.It may be related to repositories. 我可以从“ 使用类org.gradle.api.internal.artifacts.repositories.resolver.MavenVersionLister $ 1的com.android.support:support-v4的错误列表版本中理解。将尝试另一种列出版本的方法。这种行为有已被弃用,并计划在gradle 2.0中删除 “this.It可能与存储库有关。

Check whether you have this or not in dependencies area. 检查依赖关系区域中是否包含此项。 If something else is written there, remove it and add the correct one that i wrote below. 如果在那里写了其他东西,删除它并添加我在下面写的正确的。

dependencies {
    ...
    repositories {
        mavenCentral()
        mavenLocal()
    }
...
}
  • and my another guess is, there is something wrong in your support-v4 library implementation 而我的另一个猜测是,你的support-v4库实现有问题

check whether you have 检查你是否有

    dependencies {
...
        compile 'com.android.support:support-v4:22.2.0'
...
    }

this or not. 这个与否。 If not , add the line starts with compile that i wrote above. 如果没有,添加行开头编译我上面写的。 And If you have something like, 如果你有类似的东西,

compile project(':support-v4' ) compile project(':support-v4'

remove that line. 删除该行。

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

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