我尝试同步我的项目,但它总是失败,并显示以下错误消息:
无法解析:androidx。{此处指定活动名称}.espresso:espresso-core:3.2.0
在项目结构对话框中显示受影响的模块:应用程序
无法解析:androidx.{此处指定活动名称}.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'
} 发布于 2020-07-16 09:34:07
清理并构建可能会或不会在某些时候发生这种类型的错误
https://stackoverflow.com/questions/62926061
复制相似问题