0

After the last sdk update I am getting this error when I open my Android project. I tried to solve it with this solution, but the error still remains

android studio 0.4.2: Gradle project sync failed error

The message is:

Error:Socket is not connected: connect

Error:A problem occurred configuring root project 'A-muse'.
> Could not resolve all dependencies for configuration ':classpath'.

Could not resolve com.android.tools.build:gradle:2.3.3. Required by: project : Could not resolve com.android.tools.build:gradle:2.3.3. Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle- 2.3.3.pom'. Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom'. Socket is not connected: connect Could not resolve com.neenbedankt.gradle.plugins:android-apt:1.8. Required by: project : Could not resolve com.neenbedankt.gradle.plugins:android-apt:1.8. Could not get resource 'https://jcenter.bintray.com/com/neenbedankt/gradle/plugins/android-apt/1.8/android-apt-1.8.pom'. Could not GET 'https://jcenter.bintray.com/com/neenbedankt/gradle/plugins/android-apt/1.8/android-apt-1.8.pom'. Socket is not connected: connect Could not resolve com.google.gms:google-services:3.0.0. Required by: project : Could not resolve com.google.gms:google-services:3.0.0. Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'. Could not GET 'https://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'. Socket is not connected: connect Could not resolve me.tatarka:gradle-retrolambda:3.6.0. Required by: project : Could not resolve me.tatarka:gradle-retrolambda:3.6.0. Could not get resource 'https://jcenter.bintray.com/me/tatarka/gradle-retrolambda/3.6.0/gradle-retrolambda-3.6.0.pom'. Could not GET 'https://jcenter.bintray.com/me/tatarka/gradle-retrolambda/3.6.0/gradle-retrolambda-3.6.0.pom'. Socket is not connected: connect

Updated:

    android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"

    sourceSets.main {
        jni.srcDirs = []
        jniLibs.srcDir "$VUFORIA_SDK_DIR/$NATIVE_LIB_DIR/"
    }

    archivesBaseName = rootProject.projectDir.getName()

    defaultConfig {
        applicationId "com.ilunion.amuse"
        minSdkVersion 21
        targetSdkVersion 21
        versionCode 7
        versionName "1.6"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags ""
            }
        }
    }
    buildTypes {
        debug {
            minifyEnabled false
            debuggable true
            ndk {
                abiFilters "armeabi-v7a","x86"
            }
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            ndk {
                abiFilters "armeabi-v7a"
            }
        }
    }
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }

    dexOptions {
        jumboMode = true
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}

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.squareup.retrofit2:adapter-rxjava:2.0.2'
    compile project(path: ':beepconsmanager')
    compile project(path: ':step-indicator')
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.google.dagger:dagger:2.5'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.jakewharton:butterknife:8.0.1'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'
    compile 'com.squareup.retrofit2:retrofit:2.0.2'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'io.reactivex:rxjava:1.1.8'
    compile 'io.reactivex:rxandroid:0.24.0'
    compile 'com.android.support:palette-v7:25.3.1'
    compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
    //compile 'com.android.support.constraint:constraint-layout:1.0.1'
    compile 'com.github.fuzz-productions:RatingBar:1.0.3'
    compile 'com.github.chrisbanes:PhotoView:1.3.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    //difuminar
    compile 'com.eightbitlab:blurview:1.3.3'
    //crash library
    compile 'cat.ereza:customactivityoncrash:2.1.0'
    //youtube
    compile files('libs/YouTubeAndroidPlayerApi.jar')
    testCompile 'junit:junit:4.12'
    apt 'com.jakewharton:butterknife-compiler:8.0.1'
    apt 'com.google.dagger:dagger-compiler:2.5'
    compile('com.google.firebase:firebase-core:10.0.1') {
        exclude module: 'play-services-base'
        exclude module: 'support-v4'
        exclude module: 'support-annotations'
    }
    compile 'com.firebaseui:firebase-ui:1.1.1'
    //Animations
    compile 'com.daimajia.easing:library:2.0@aar'
    compile 'com.daimajia.androidanimations:library:2.2@aar'
    compile files('libs/Vuforia.jar')
    apply plugin: 'me.tatarka.retrolambda'
    compile 'com.google.android.gms:play-services-maps:10.0.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.android.gms:play-services-location:10.0.1'
    compile 'com.google.maps.android:android-maps-utils:0.4+'
}

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

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        classpath 'com.google.gms:google-services:3.0.0'
        classpath 'me.tatarka:gradle-retrolambda:3.6.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url "https://www.jitpack.io"}
        maven { url 'https://maven.fabric.io/public' }

        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Alok Nair
  • 3,994
  • 3
  • 24
  • 30
Ruben Manzano
  • 39
  • 3
  • 12

0 Answers0