16

I've just updated to Android Studio 1.3, opened an existing project I was working on, tried to run it. Gradle just gets stuck at the "Resolve dependencies':app_debugCompile'", I tried to wait, I waited for over an hour and nothing happened.

How can I solve it to get my app running?

Basil
  • 845
  • 9
  • 24
  • 2
    Same here daily. `Android Studio > 1.1 totally sucks.` – M D Jun 03 '15 at 10:48
  • There are chance s that gradle is upgrading in background, Assuming that having slow internet connection this process might take several minutes( several hours) to complete. If not that Try reinstalling Android Studio. – Prashant Patel Jun 03 '15 at 10:52
  • I tried to create a new project and it compiled successfully, I think it is some backwards compatibility issue – Basil Jun 03 '15 at 11:09

6 Answers6

5

If you are using proxy, it seems https proxy server setting is not correctly done in Android studio 1.3. You can set https proxy server manually in gradle.properties,

systemProp.https.proxyHost=proxy.server.address
systemProp.https.proxyPort=8080

see Gradle Sync fails in Android studio 1.3 and gradle behind proxy in Android Studio 1.3.

Community
  • 1
  • 1
corochann
  • 1,604
  • 1
  • 13
  • 24
1

How can I solve it to get my app running?

Start by identifying the problem more precisely. To do so, run gradle from the command line in the root directory of your project :

./gradlew --debug clean build

The --debug argument will simply enable the debug log level and hopefully providing useful information to understand where/why it is hanging.

ben75
  • 29,217
  • 10
  • 88
  • 134
1

I face this problem in linux and my problem solved after installing these dependencies on fedora :

sudo dnf install glibc.i686 zlib.i686 libstdc++-devel.i686 
1

I had this problem.Just see this page. Solution is here

Solution :

  1. Make sure you have latest stable version ( current 2.0.0 )
  2. Make sure your gradle version is 2.0.0 in build.gradle ( classpath 'com.android.tools.build:gradle:2.0.0')
  3. Final step and most important one is change your jcenter() to mavenCentral()

So you can easily add new dependency and sync project under 3sec !

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Community
  • 1
  • 1
Mehdi Jahed Manesh
  • 2,228
  • 2
  • 17
  • 34
0

Go to app > Right Click on it > Open Module Settings>Change build tool version to 22.0.1 Try again after restarting your Android Studio

5511002233
  • 503
  • 8
  • 19
0

I've just encountered this issue in the OP, in my case it was taking over 20min just to get gradle build going. Getting stuck at the "Resolve dependencies':app_debugCompile'" as well.

I'm still relatively new to Stackoverflow so I can't up-vote yet. But what I can tell you is that if your behind a web proxy like I am and you've just updated to Android 1.3.1 you will probably notice this issue immediately. I already had my companies web proxy in the IDE settngs and yes there is something not ok with the 1.3.1 update. As corochann posted you have to add the proxy info to the gradle.properties of your project. Once I actually did this I noticed the difference immediately. Going forward until its resolved you'll probably have to add this to each project if your behind a web proxy and running 1.3.1. I have another machine at home that isn't behind a proxy and is running Android Studio version before 1.3.0 and had no issues. Hope this helps!!

shaolin
  • 1
  • 1