0

I have a problem in Android Studio. All of a sudden, it stucks at starting app building. I tried changing the repos and nothing changes.

If i create a new project i have no errors.

This is the error message: Gradle: Resolve dependencies ':app:_debugApk'. The loading bar is moving endlessly.

This is my entire Project build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}


allprojects {
    repositories {
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Here is the App build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.3'

    defaultConfig {
        applicationId "APP ID"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        debug {
            resValue "string", "google_maps_api_key", "API KEY"
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable true
        }
        release {
            resValue "string", "google_maps_api_key", "API KEY"
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable true
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
})


    compile 'com.google.android.gms:play-services-auth:11.0.4'
    compile 'com.facebook.android:facebook-android-sdk:4.+'

    compile 'com.google.android.gms:play-services:11.0.4'
    compile 'com.google.android.gms:play-services-ads:11.0.4'

    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.google.firebase:firebase-core:11.0.2'
    compile 'com.google.firebase:firebase-crash:10.0.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    compile 'com.google.firebase:firebase-config:10.0.1'
    compile 'com.google.firebase:firebase-ads:10.0.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'

    compile 'com.google.code.gson:gson:2.8.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'org.osmdroid:osmdroid-android:5.6.3'
    compile 'com.sothree.slidinguppanel:library:3.3.1'
    compile 'com.mikhaellopez:circularimageview:3.0.2'
    compile 'com.github.florent37:materialtextfield:1.0.7'

    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

What should i to do to correct this error?

Ivan Territo
  • 43
  • 2
  • 7
  • Are there any differences between the build file from the project that works to your current project's build file? – Maxwell Sep 13 '17 at 20:19
  • @Maxwell no, just that in the new one the repos are both jcenter(). But "fixing" that nothing is changing – Ivan Territo Sep 13 '17 at 20:21
  • What does the app's (not project) build file look like? – Maxwell Sep 13 '17 at 20:23
  • @Maxwell can you to see the changes in the question? – Ivan Territo Sep 13 '17 at 20:36
  • I can. I don't see anything unusual. Doing a quick google search, have you looked at any of these SO posts? https://stackoverflow.com/questions/23837465/android-studio-stuck-on-gradle-resolve-dependancies-debugcompile-or-detac https://stackoverflow.com/questions/27648966/android-studio-stuck-on-gradle-resolving-dependencies – Maxwell Sep 13 '17 at 20:41
  • @Maxwell nothing about the Proxy and neither about the offline mode. In this second case first was asked to me a more recent version on gradle (i had 3.2 and minimum seems to be 3.3), now i have 4.1. But continuing in offline mode it can't compile other online dependencies (gson 2.8.0). – Ivan Territo Sep 13 '17 at 21:17

0 Answers0