小编Hel*_*hah的帖子

无法解决:com.android.support:appcompat-v7:27.+(依赖性错误)

我在Android studio中遇到此问题.

Error:Failed to resolve: com.android.support:appcompat-v7:27.+
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="open.dependency.in.project.structure">Show in Project Structure 
dialog</a>
Run Code Online (Sandbox Code Playgroud)

我的Android Studio充满了错误,android studio无法识别库.整个屏幕看起来像这样.

图片

这是我的Gradle代码:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.1"

    defaultConfig {
        applicationId "com.example.hp.temp"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:27.+'
}
Run Code Online (Sandbox Code Playgroud)

android android-studio android-gradle-plugin

60
推荐指数
2
解决办法
16万
查看次数