我已经安装了 Android Studio 并尝试创建应用程序。
我的 build.gradle 模块文件是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.example.a79231.myapplication"
minSdkVersion 22
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'
}
}
}
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:26.+'
testCompile 'junit:junit:4.12'
}
I have installed sdk tools并安装了 26.0.0
我有错误:
在文件
在文件
我试图将 espresso-core:2.0 更改为 espresso-core: 2.2.2 和 appcompat-v7:26.+ 到 appcompat-v7: 26.0.0 但错误是一样的。
我也尝试重新安装 Android Studio。结果是一样的。
最佳答案
添加到存储库 block 中的主 build.gradle
行家 { 网址 ' https://maven.google.com ' }
关于android - Gradle: espresso-core & appcompat 无法解决; SDK安装没有额外功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44927295/