我无法理解支持库的版本方案以及何时使用哪个版本。目前我有一个项目compileSdkVersion 21
,minSdkVersion 21
并且targetSdkVersion 21
想要使用 android 设计支持库。当我使用com.android.support:design:22.2.0
项目编译但我得到一个 Gradle 警告:
"This support library should not use a different version (22) than the `compileSdkVersion` (21)".
当我使用时com.android.support:design:23.0.1
,会出现一些编译错误,例如:
"Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
我以为只要compileSdkVersion
较低或相等,我就可以始终使用最高版本的支持库,但这似乎是错误的。
在针对 API 级别 21 进行编译时,我可以使用设计支持库吗?