我使用Android工作室,我想使用API超过21 首先,降低材料的设计特点我看这些问题:使用材料设计,前5个Android设备
how to use material design features in api lower than 21 in eclipse?
I want Material Design in Pre 5.0 device in eclipse
Android Design Support Library And Material Design Backwards Compatibility?
而且我也阅读这些:
https://developer.android.com/training/material/compatibility.html
https://developer.android.com/tools/support-library/features.html#v7-appcompat
而且我用这个教程创建一个兼容的材料设计项目:
http://www.androidhive.info/2015/04/android-getting-started-with-material-design/
我添加了这个库:com.android.support:appcompat-v7:21.0。 0和我使用像上一个链接的材质主题,但我无法看到我的android 4.2.2中的任何材质功能。正如我从谷歌开发人员了解到的,它使用兼容性来显示API 21中的材质特性,并且它仍然可以在android中低于21的材质特性下工作。 那么,如何使用低于21的android材质特性呢?
我gradle这个是这样的:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "test.parsoa.com.newmaterial"
minSdkVersion 17
targetSdkVersion 21
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:21.0.0"
}
你'build.gradle'看起来像什么? – Nachi