我创建了一个新的 android 项目它在构建时显示错误
我尝试了现有的答案
错误是
错误:无法解析“:app@debugAndroidTest/compileClasspath”的依赖关系:无法解析 junit:junit:4.12。
错误:无法解析“:app@releaseUnitTest/compileClasspath”的依赖关系:无法解析 junit:junit:4.12。
错误:无法解析“:app@debugUnitTest/compileClasspath”的依赖关系:无法解析 junit:junit:4.12。
错误:无法解析“:app@debugAndroidTest/compileClasspath”的依赖关系:无法解析 com.google.code.findbugs:jsr305:2.0.1。
我的 gradle 文件的依赖项部分
dependencies
{
implementation 'androidx.appcompat:appcompat:1.0.2'
testImplementation 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud)
我不明白这是我的第一个项目。
我的项目等级是
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories { …Run Code Online (Sandbox Code Playgroud)