AndroitTestがうまく動かなくなったのでRobolecticを試そうとしたら初歩的なところでつまずいたので記録しときます。
build.gradle
{
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
jcenter()
mavenCentral()
mavenLocal()
}
dependencies{
testCompile 'junit:junit:4.12'
testCompile "org.mockito:mockito-core:1.9.5"
testCompile('org.robolectric:robolectric:3.0-rc2') {
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
}
}
リポジトリも指定しているのになんで?と思ったらオフラインになってただけでした。
Preference> Build, > Gradle > Global Gradle Settings > Offline work
今まで普通に動いてたので見落としてました。。。