这个问题在这里已有答案:
请在此图片中查看此错误
这是app.build iv'e刚安装android studio 3.0,这是图片中的错误不知道该怎么办请帮帮我
无法解析':app @ debugUnitTest / compileClasspath'的依赖关系:无法解析junit:junit:4.12 .
无法解决junit:junit:4.12 . 要求:项目:app
无法解决junit:junit:4.12 . 无法获取资源'https://dl.google.com/dl/android/maven2/junit/junit/4.12/junit-4.12.pom' . 无法获取“https://dl.google.com/dl/android/maven2/junit/junit/4.12/junit-4.12.pom” . 连接到dl.google.com:443 [dl.google.com/172.217.24.14]失败:连接超时:连接超时:连接
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.mahilum.meebot"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
1 回答
请在app build gradle文件中添加以下行 .