卡在androiddebugCompileTest上并显示gradle构建错误

时间:2017-02-16 10:52:54

标签: android build.gradle

##这是我的build.gradle应用程序模块##

 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'
    }

** ---------- **这是我在gradle建设10-20分钟后得到的错误(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

1 个答案:

答案 0 :(得分:0)

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

对此进行评论并重建。它没那么必要。你在网上建了吗?