我在我的应用程序的 build.gradle 文件中为 espresso 测试添加了以下依赖项:
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
testCompile 'com.android.support.test:runner:1.0.2'
testCompile 'com.android.support.test:rules:1.0.2'
androidTestCompile 'com.android.support.test:runner:1.0.2'
androidTestCompile 'com.android.support.test:rules:1.0.2'
androidTestCompile 'com.android.support:support-annotations:25.4.0'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile ("com.android.support.test.espresso:espresso-contrib:3.0.2"){
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-v7'
exclude group: 'com.android.support', module: 'design'
exclude module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
然而,当我尝试
import android.support.test.espresso.contrib
它告诉无法解析符号“贡献”。我应该怎么办?
狐的传说
相关分类