由于依赖关系失败,gradle无法同步

时间:2020-10-04 10:21:31

标签: android android-studio androidx

启动android studio时,除了gradle之外,其他所有东西都按预期加载。 这给了我两个错误:

Failed to resolve: androidx.mini_window_style.ext:junit:1.1.1
Failed to resolve: androidx.mini_window_style.espresso:espresso-core:3.2.0

当我点击运行时,应用程序正在加载,但是我看不到xml文件

这些是我的依赖项:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.navigation:navigation-fragment:2.1.0'
    implementation 'androidx.navigation:navigation-ui:2.1.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.mini_window_style.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    androidTestImplementation 'androidx.mini_window_style.espresso:espresso-core:3.2.0'
}

1 个答案:

答案 0 :(得分:0)

删除这些依赖项:

androidTestImplementation'androidx.mini_window_style.ext:junit:1.1.1'

androidTestImplementation 'androidx.mini_window_style.espresso:espresso-core:3.2.0'