Search code examples
androidandroid-support-libraryandroid-appcompatandroidxmaterial-components-android

What replaced appcompat-v7 in AndroidX


After migrating a couple of my older projects over to AndroidX it as though three of my dependencies are deprecated:

   implementation 'com.android.support:appcompat-v7:28.0.0'
   implementation 'com.android.support:design:28.0.0'
   implementation 'com.android.support:cardview-v7:28.0.0'

I haven't been able to find a replacement for these dependencies.

Does AndroidX have an equivalent for these dependencies?


Solution

  • Use in the order:

    implementation 'androidx.appcompat:appcompat:1.0.2'   
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    

    If you would like to use alpha/beta releases:

    implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
    implementation 'com.google.android.material:material:1.1.0-alpha09'
    

    More info about the releases: