【问题标题】:Failed to resolve : com.android.support:design:26.0.0 [duplicate]无法解决:com.android.support:design:26.0.0 [重复]
【发布时间】:2017-08-23 00:09:41
【问题描述】:

我的项目中不能包含材料设计库

这是我的 build.gradle 文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId "com.example.abdelmagied.myapplication"
        minSdkVersion 15
        targetSdkVersion 26
        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:26.0.0-alpha1'
    compile 'com.android.support:design:26.0.0'
}

每次同步时都会出现此错误:

无法解决:com.android.support:design:26.0.0

【问题讨论】:

  • 您可以尝试将存储库部分添加到您的 build.gradle 中,例如这样。存储库 { jcenter() maven { url "maven.google.com" } }

标签: android material-design


【解决方案1】:

确保您已从 SDK 管理器下载支持库(在 OSX 中:工具 > Android > SDK 管理器 --> SDK 工具选项卡)

【讨论】:

  • 这对我有用!!谢谢朱利安!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-01-03
  • 1970-01-01
  • 1970-01-01
  • 2017-12-19
相关资源
最近更新 更多