gpt4 book ai didi

java - 如何解决gradle同步失败:SSL handshake connection when trying to download recycleview?

转载 作者:行者123 更新时间:2023-12-02 02:48:59 27 4
gpt4 key购买 nike

我尝试下载 RecycleView 以便在我的项目中使用,但此错误不断发生并且下载失败。

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)

这是项目构建 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
}

这是模块:应用程序构建 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'

最佳答案

由于没有人回答我的问题,我将发布此答案。也许它会对可能面临此类问题的人有所帮助。我通过更新 Firebase 库解决了这个问题将这两个依赖项更新到最新版本并且成功运行。

//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'

关于java - 如何解决gradle同步失败:SSL handshake connection when trying to download recycleview?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57123335/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com