Android studio – Faild to resolve:com.android.support:design:26.0.1错误

前端之家收集整理的这篇文章主要介绍了Android studio – Faild to resolve:com.android.support:design:26.0.1错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个错误叫:
"Failed to resolve: com.android.support:design:26.0.1".

我的android studio版本是3.0 beta 1.

我的gradle文件如下:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
    applicationId "hojune.example"
    minSdkVersion 17
    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(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:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:26.0.1'
}

我想把“设计”放到我的项目中,但我不能这样做.我该怎么做?

解决方法

尝试改变
buildToolsVersion "26.0.0"

com.android.support:design:26.0.0

或者不要更改为bulidToolsVersion更改依赖项

compile 'com.android.support:design:26.0.0-alpha1'

猜你在找的Android相关文章