Design support library - Which version to use with SDK v21

后端 未结 2 381
旧时难觅i
旧时难觅i 2020-12-05 11:01

I have problems to understand the version scheme of the support libraries and when to use which version. Currently I have a project with compileSdkVersion 21, <

2条回答
  •  隐瞒了意图╮
    2020-12-05 11:22

    Support Library should always match the compileSdkVersion even if the targetSdkVersion or minSdkVersion are lower. If you want to use the design library you will need to set compileSdkVersion to at least 22 and library version 22.2.0.

    The reason for that is simple. The version of the library reflects the version of the Android sdk against it was built. If you try to use a higher level version of the support library than the compileSdkVersion it may not find resources that were added in a later version.

提交回复
热议问题