Android Studio stuck when creating new Project on Gradle: Configure Project or Gradle: Resolve Dependencies ':classpath:'

前端 未结 4 620
时光说笑
时光说笑 2020-12-14 10:17

Using the new project wizard to create a new Android application, The IDE gets stuck before I can even see the Code files. After trying to create many types of projects, It

相关标签:
4条回答
  • 2020-12-14 10:59

    I had a similar problem and was able to use both repositories by including them both in my build.gradle in my android directory:

    allprojects {
        repositories {
            mavenCentral()
            jcenter()
        }
    }
    

    This is an adjustment to @MHDante's answer - instead of replacing one with the other, you can use both!

    0 讨论(0)
  • 2020-12-14 11:06

    I was heaving the same/similar problem:

    Error:A problem occurred configuring root project 'X'. Could not resolve all dependencies for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:0.12.+. Required by: :X:unspecified Failed to list versions for com.android.tools.build:gradle. Could not list versions using M2 pattern 'http://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-revision.[ext]'. Could not GET 'http://jcenter.bintray.com/com/android/tools/build/gradle/'. Received status code 401 from server: Authorization Required

    But I resolved it by calling synchroise and then rebuilding the project.

    0 讨论(0)
  • 2020-12-14 11:15

    In order to solve it, I went to File -> Project Structure -> Project and changed:

    Android Plugin Repository and Default Plugin Repository from their default values of

    jCenter()

    to

    mavenCentral

    0 讨论(0)
  • 2020-12-14 11:20

    Bintray has experienced momentary timeouts yesterday due to a change to one of the cluster nodes in Dallas. It looks like you've happened to hit that exact node at that exact time.

    The issue has been sorted out after a couple of minutes, so there is no real need to change anything on your side.

    Actually, keeping jcenter() in your script is preferable since it's a super-set of Maven Central.

    0 讨论(0)
提交回复
热议问题