我學習如何使用ConstraintLayout構建響應式UI,方法是遵循此article。但是我的Android項目中看不到ConstraintLayout選項。Android Studio中沒有ConstraintLayout
的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.tony.chatapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
}
repositories {
maven {
url 'https://maven.google.com'
}
}
我錯過了什麼嗎?
但我使用API 23 –
@JohnJoe,android studio的最低需求是2.3 – Maddy