android.support.v7.widget.CardView could not be found (Android Studio 1.1 Preview)

后端 未结 7 1673
既然无缘
既然无缘 2020-12-10 00:22

\"enter

I\'m trying to add CardView to my activity as the official sample. But it does

7条回答
  •  Happy的楠姐
    2020-12-10 01:21

    With the release of Android 9.0 (API level 28) there is a new version of the support library called AndroidX

    And the support library will be discontinued...

    Add the following to buld.gradle:app

    dependencies {
        ...
        implementation 'androidx.recyclerview:recyclerview:1.0.0'
        implementation 'androidx.cardview:cardview:1.0.0'
        ...
    }
    

提交回复
热议问题