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

微笑、不失礼 提交于 2019-12-09 08:00:37

问题


I am new to Android Studio.I have an existing android project which was build from android studio. 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)
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.


回答1:


First, we need your 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

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.

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

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')

remove that line.



来源:https://stackoverflow.com/questions/25645910/how-to-open-existing-android-projectbuild-gradle-into-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!