我尝试同步我的项目,但它一直失败并显示以下错误消息:
无法解决:androidx.{此处的特定 Activity 名称}.espresso:espresso-core:3.2.0
在项目结构对话框中显示
受影响的模块:app
无法解决:androidx.{此处的特定 Activity 名称}.ext:junit:1.1.1
android {
compileSdkVersion 30
buildToolsVersion "30.0.0"
defaultConfig {
applicationId "com.example."
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner ".runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta8'
testImplementation 'junit:junit:4.13'
androidTestImplementation '.ext:junit:1.1.1'
androidTestImplementation '.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
}
最佳答案
清理和构建可能会或可能不会有时会发生这种类型的错误
关于Android Studio 无法解析 : . 浓缩咖啡 :espresso-core:3. 2.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62926061/