我在布局
的设计编辑器中遇到以下错误我在设计编辑器上选择了API版本23.
我安装了版本为23的SDK工具
我在build.gradle中提到buildToolsVersion为“23.0.1”
我还不确定为什么Android Studio要求更新Android Studio版本。
当我检查“帮助”菜单中的“更新”时。它显示如下。
当我在设计编辑器中将API版本从23更改为21时,我没有收到任何错误。但我不明白为什么API版本23在设计编辑器中不起作用,即使我在SDK Manager中安装了该版本。
build.gradle:
apply plugin:'com.android.application'
buildscript { 存储库{ jcenter() } 依赖{ classpath'com.android.tools.build:grad:2.1.0' classpath'com.google.gms:google-services:2.1.2' } }
android { compileSdkVersion 23 buildToolsVersion“23.0.1”
defaultConfig {
applicationId "com.apso"
minSdkVersion 18
targetSdkVersion 23
versionCode 2
versionName "2.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.squareup.okhttp:okhttp:2.7.0'
compile 'com.jakewharton:butterknife:7.0.1'
provided 'com.android.support:support-annotations:23.1.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
}
apply plugin: 'com.google.gms.google-services'