我有一个错误叫:
"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'