gpt4 book ai didi

android - '实现 'com.android.support:recyclerview-v7:28.0.0'给出无法获取资源错误

转载 作者:行者123 更新时间:2023-12-03 04:15:29 26 4
gpt4 key购买 nike

我正在使用Android Studio 3.0和我的android项目
我正在尝试添加

'implementation 'com.android.support:recyclerview-v7:28.0.0'

同步后,它会显示以下错误,但我没有发现错误。
无法解析所有依赖项以进行配置
':app:debugRuntimeClasspath'.
Could not determine artifacts for com.android.support:recyclerview-v7:28.0.0
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/recyclerview-v7/28.0.0/recyclerview-v7-28.0.0.aar'.
Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/support/recyclerview-v7/28.0.0/recyclerview-v7-28.0.0.aar'.
Connect to dl.google.com:443 [dl.google.com/192.168.1.1] failed: Connection refused (Connection refused)
Connection refused (Connection refused)

其他信息:
compileSdkVersion 28
minSdkVersion 16
targetSdkVersion 28

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
}


buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'

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

最佳答案

从build.gradle中删除这些行,然后尝试再次同步,可能是这些行引起了问题。

 androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

关于android - '实现 'com.android.support:recyclerview-v7:28.0.0'给出无法获取资源错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56498189/

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