什么取代了AndroidX中的appcompat-v7 [英] What replaced appcompat-v7 in AndroidX

本文介绍了什么取代了AndroidX中的appcompat-v7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将几个较旧的项目迁移到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.

AndroidX是否具有与这些依赖项等效的功能?

Does AndroidX have an equivalent for these dependencies?

推荐答案

按以下顺序使用:

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

如果您想使用 alpha/beta 版本:

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

有关发行版的更多信息:

More info about the releases:

  • AndroidX Releases
  • Material Components library

这篇关于什么取代了AndroidX中的appcompat-v7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆