在你的项目中的 build.gradle(Module:app)中将
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.0', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:22.0.0' testCompile 'junit:junit:4.12' }中的testCompile一行删除掉就好了