小编Noe*_*ton的帖子

无法解析 com.android.support.espresso:espresso-core:2.2.2

我刚刚第一次下载了 android studio,但出现了 gradle 错误。我已经下载了 SDK 提供的所有内容,但仍然出现相同的错误。

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "com.example.noelly.myapplication"
    minSdkVersion 19
    targetSdkVersion 25
    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.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.+'
testCompile 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud)

我得到的错误是

  (Failed to resolve: com.android.support.appcompat-v7:25.+)
Run Code Online (Sandbox Code Playgroud)

(Failed to resolve: com.android.support.espresso:espresso-core:2.2.2)
Run Code Online (Sandbox Code Playgroud)

顺便说一下,一切都是最新的,请帮助这真是令人沮丧的开始。

**从答案中编辑-安装工具的一张图片--- sdktoolsscreenshot …

compiler-errors android-studio android-gradle-plugin

3
推荐指数
1
解决办法
2万
查看次数