Design support library - Which version to use with SDK v21

后端 未结 2 380
旧时难觅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:26

    You can use one of these:

    //You have to use compileSdkVersion=22
    compile 'com.android.support:design:22.2.0'
    compile 'com.android.support:design:22.2.1'
    
    //You have to use compileSdkVersion=23
    compile 'com.android.support:design:23.3.0'
    compile 'com.android.support:design:23.2.1'
    compile 'com.android.support:design:23.2.0'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:design:23.1.0'
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:design:23.0.0'
    

    The design library has dependency with appcompat-v7 library.
    You can't use the v23.0.x version compiling with api 22 (it is the reason of "Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

    Also, because the first version of the design library is 22, you can't use compileSdk=21.

提交回复
热议问题