android-studio - 我无法添加任何库
问题描述
当我尝试添加任何库时,我有一个简单的错误:
无法解析“:app@debug/compileClasspath”的依赖关系:无法解析androidx.recyclerview:recyclerview:1.2.0。显示详细信息 受影响的模块:app
我只添加了一个 RecyclerView。我的毕业生:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.abbasmehdipur.myapplication"
minSdkVersion 23
targetSdkVersion 29
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.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
解决方案
终于发现问题了!!!只是一个糟糕的代理设置。
推荐阅读
- bash - 如何编写 bash 脚本来设置工作环境?
- python - 如何使用 python 处理 JSON 嵌套列表
- c++ - 你可以在加载的 caffe 网络中更改层参数吗?
- c++ - 尽管有友谊,但无法访问的基类
- python - Prevent lxml selecting next text node after matched element
- javascript - memoizee - 基于参数缓存
- javascript - 递归:当可能有多个子路径时,跟踪所有递归路径中的变量
- python - 在python中使用用户定义的转换函数将灰度图像转换回rgb图像的问题
- python - 如何创建一个宏来循环遍历 Pandas Dataframe 中的所有列?
- reactjs - 反应不考虑上下文路径