Danger Zone
Danger Zone

Reputation: 59

how to solve gradle faild sync:SSL handshake connection when trying to download recycleview?

I've tried to download RecycleView in order to use in my project but this error keeps occurring and download fails.

Gradle sync failed: Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'. Could not determine artifacts for androidx.recyclerview:recyclerview:1.0.0 Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/recyclerview/recyclerview/1.0.0/recyclerview-1.0.0.aar'. Could not HEAD 'https://dl.google.com/dl/android/maven2/androidx/recyclerview/recyclerview/1.0.0/recyclerview-1.0.0.aar'. Remote host closed connection during handshake SSL peer shut down incorrectly Consult IDE log for more details (Help | Show Log) (12 s 965 ms)

This is the Project Build Gradle:

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        google()
        maven { url 'http://repo.maven.apache.org/maven2' }
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.google.gms:google-services:4.2.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

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

and this is the Module:App build Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"
    defaultConfig {
        applicationId "com.aden.adenmarket"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.firebase:firebase-core:17.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.google.firebase:firebase-auth:18.0.0'
    implementation 'com.google.firebase:firebase-firestore:20.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
apply plugin: 'com.google.gms.google-services'

Upvotes: 0

Views: 2457

Answers (1)

Danger Zone
Danger Zone

Reputation: 59

Since no one answered my question, I'll post this answer. Maybe it'll help someone who may face an issue like this. I solved this problem by updating Firebase libraries and updating these two dependencies to the last version and it worked successfully .

//module:app
    implementation 'com.google.firebase:firebase-auth:18.1.0'
    implementation 'com.google.firebase:firebase-firestore:20.1.0'
     implementation 'com.google.firebase:firebase-core:17.0.1'
//project Build Graddle
     classpath 'com.android.tools.build:gradle:3.4.2'
     classpath 'com.google.gms:google-services:4.3.0'

Upvotes: 2

Related Questions