Gradle cannot resolve dependencies in Android Studio

前端 未结 3 1590
面向向阳花
面向向阳花 2021-01-04 21:03

I am developping an Android application on Android Studio with 3 collegues and recently, our project cannot be built anymore. We all have different versions of Android Studi

相关标签:
3条回答
  • 2021-01-04 21:45

    After adding the JAVA_HOME variable, I was able to compile my application like usual.

    EDIT:

    After I got the another error (see EDIT 2 on the question), I just deleted the build folder of my project and it worked again.

    EDIT 2:

    It stopped working again (see EDIT 3 on the question)

    0 讨论(0)
  • 2021-01-04 21:47

    I think that the problem you are hitting in Edit 3 is connected with those lines:

    maven {
        url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/"
    }
    
    maven {
        url "http://files.couchbase.com/maven2/"
    }
    

    Some of those repositories is not active any more, and Android Studio has no timeout when checking that (freakin crazy, right?!).

    This was my issue at least: Android Studio stuck on "Gradle: resolve dependancies '_debugCompile'" or 'detachedConfiguration1'

    0 讨论(0)
  • 2021-01-04 21:54

    In my case one of developers did not include gradle.properties in .gitignore file, and it was the cause of stuck

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