错误:(25,13)无法解决:com.android.support:design:27。+

时间:2017-11-20 06:25:42

标签: android android-gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.example.mypc.pop_up"
        minSdkVersion 15
        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.+'
    compile 'com.android.support:design:27.+'
}

2 个答案:

答案 0 :(得分:1)

compileSdkVersion 27
buildToolsVersion '26.0.2'
defaultConfig {
    applicationId "com.your.package"
    minSdkVersion 15
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

dependencies {
   final SUPPORT_LIBRARY_VERSION = '27.0.1'
   compile fileTree(include: ['*.jar'], dir: 'libs')
   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:$SUPPORT_LIBRARY_VERSION"
}

你好,你应该这样使用

答案 1 :(得分:0)

  

重要提示:支持库现在可通过Google的Maven存储库获取。您无需下载支持   SDK Manager中的存储库。有关详细信息,请参阅Support Library Setup

第1步:打开应用程序的build.gradle文件。

第2步:确保存储库部分包含带有" https://maven.google.com"的maven部分。端点。例如:

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}