我下载Robolectric Samples并由Android Studio(版本1.2.1.1)导入。在$subject = preg_replace(
$pattern,
'\1'.preg_quote_replacement($url).'\3'.preg_quote_replacement($title).'\4',
$subject
);
下,我追加依赖关系,如下所示:
android-api-19
我可以通过dependencies {
testCompile "junit:junit:4.10"
testCompile "org.json:json:20080701"
testCompile "org.ccil.cowan.tagsoup:tagsoup:1.2"
testCompile "org.assertj:assertj-core:1.7.0"
testCompile "org.robolectric:robolectric:${robolectricVersion}"
testCompile "org.robolectric:android-all:4.4_r1-robolectric-1"
testCompile "org.robolectric:shadows-core:3.0-rc2"
}
视图查看json
,tagsoup
,shadows-core
和android-all
个库。我也可以在$ {GRADLE_HOME} /caches/modules-2/files-2.1目录下看到它们。但是当我使用Gradle Test运行项目时,会发生错误:
Project
有什么建议吗?