2017-02-23 1 views
1

내 안드로이드 애플 리케이션을위한 단위 테스트를 배우고 있습니다. 이를 달성하기 위해 프레임 워크 roboelectric을 사용하고 있습니다.해결 실패 : org.roboelectric : roboelectric : 3.2.2

build.gradle

apply plugin: 'com.android.application' 
apply plugin: 'realm-android' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.2" 
    defaultConfig { 
     applicationId "com.xyz.helloworld" 
     minSdkVersion 15 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 

    dataBinding { 
     enabled = true 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    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:25.1.1' 
    testCompile 'junit:junit:4.12' 
    testCompile 'org.robolectric:robolectric:3.2.2' 
} 

나는 Gradle을 여러 번와 동기화 오류 Failed to resolve: org.roboelectric:roboelectric:3.2.2 &을 얻고있다.

enter image description here 이 문제를 어떻게 해결할 수 있습니까? 미리 감사드립니다.

+0

'compile group :'org.robolectric ', 이름 :'robolectric ', 버전 :'3.2.2'' –

+0

'testCompile'로 시도 할 수 있습니다. org.robolectric : robolectric : 3.2.1 "' –

+0

Do 리포지토리 섹션에 mavenCentral()이 포함되어 있습니까? –

답변

1

어떤 프록시 문제였습니다. 나는 다른 네트워크로 전환했다. 그런 다음 나를 위해 일했다. 감사합니다

관련 문제