0

I am trying to open new android project, then i will get an error the error is, Failed to resolve:junit:junit:4.12 Error(23,13) please help me to fix it.

build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.example.akhil.myapplication"
        minSdkVersion 22
        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'])
    compile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
}
Harshad Pansuriya
  • 20,189
  • 8
  • 67
  • 95
Akhil
  • 379
  • 4
  • 14

2 Answers2

1

Remove compile 'junit:junit:4.12' from the build.gradle file.

so the finally code look like this

Code :

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
}
Harshad Pansuriya
  • 20,189
  • 8
  • 67
  • 95
0

comment out junit dependency and then rebbuild the project.