3

## this is my build.gradle app module##

 apply plugin: 'com.android.application'

    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.3"
        defaultConfig {
            applicationId "com.mytech.wv"
            minSdkVersion 19
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner 


        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        compile 'com.android.support:appcompat-v7:23.4.0'
        compile 'com.android.support:design:23.4.0'
    }

**---------- ** this is the error i m getting after 10-20 min of gradle building (androiddebugCompileTest) ****

 Error:Error:Failed to resolve: junit:junit:4.12
   Error:Error:Failed to resolve: javax.inject:javax.inject:1
   Error:Error:Failed to resolve: javax.annotation:javax.annotation-api:1.2
   Error:Error:Failed to resolve: com.google.code.findbugs:jsr305:2.0.1
   Error:Error:Failed to resolve: org.hamcrest:hamcrest-library:1.3
   Error:Error:Failed to resolve: org.hamcrest:hamcrest-integration:1.3
   Error:Error:Failed to resolve: com.squareup:javawriter:2.1.1
  • see this link same as your question http://stackoverflow.com/questions/32519219/error23-17-failed-to-resolve-junitjunit4-12 – Chetan Joshi Feb 16 '17 at 10:56

1 Answers1

0
 Error:Error:Failed to resolve: junit:junit:4.12

comment this and rebuild. It is not that much necessary. Did you build online ?

Shyamali
  • 329
  • 7
  • 22