我的build.gradle文件如下:无法解析:com.android.support.test.espresso
应用插件: 'com.android.application'
的Android {
compileSdkVersion 26
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "com.xavier.hello"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
依赖性{
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
排除组: 'com.android.support',模块: '支持的注解'
})
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
它给每次以下错误:
您可以发布您的文件的gradle的 '库' 块解决呢? – jdonmoyer
看到其他计算器后我的答案,它会给你为什么要包括Maven的URL的原因[未能解决的依赖(https://stackoverflow.com/a/46417743/3805770) –