相关疑难解决方法(0)

错误:(23,17)无法解决:junit:junit:4.12

为什么每次我在Android Studio中创建一个新项目时,它总是会出现:

错误:(23,17)无法解决:junit:junit:4.12?

当我删除testCompile 'junit:junit:4.12'依赖项时,它不再是一个问题.

的build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.okedroid.myapplication"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.0.1'
}
Run Code Online (Sandbox Code Playgroud)

java junit android react-native

128
推荐指数
9
解决办法
25万
查看次数

标签 统计

android ×1

java ×1

junit ×1

react-native ×1