Android Studio 无法解析 : . 浓缩咖啡 :espresso-core:3. 2.0

标签 android gradle

我尝试同步我的项目,但它一直失败并显示以下错误消息:
无法解决: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/

相关文章:

android - 使用 sdk 3.0 在 facebook 墙上发帖

javascript - 编辑路径身份验证页面时出现问题

java - 按钮启动新 Activity 无法启动?

intellij-idea - 无法注册类型为 'SOURCE' 的给定路径,因为它超出了内容根目录

android - 在 Android 中使用多个 SpanObjects 还是多个 TextViews 更好?

android - lambda 回调中 Android Cocos2D-x 应用程序的段错误

android - 如何通过 Jenkins 中的构建数量设置 android 应用程序版本?

bash - Gradle Wrapper编译和构建代码并运行单个单元测试

android - 将Google Play服务从6.5.87更新到7.5.0时出错

android - 我在 build.gradle(Project) 中找不到 buildscript