当前位置: 首页 > 工具软件 > V2EX-android > 使用案例 >

androidx

范稳
2023-12-01

       android x 使用,官方有详细blog,可以让自己少踩些坑,介绍了新创建的项目和老项目中如何使用android x,androidx替换的support包中哪些内容,以及提到过渡,会继续在新的supper包28中添加一些androidx中的内容。

If you don't want to switch over to the new androidx and com.google.android.material packages yet, you can use Material Components via the com.android.support:design:28.0.0-alpha1 dependency.

Note: You should not use the com.android.support and com.google.android.material dependencies in your app at the same time.

 ----摘自 :https://github.com/material-components/material-components-android/blob/master/docs/getting-started.md

相关内容:

https://android-developers.googleblog.com/2018/05/hello-world-androidx.html

https://developer.android.com/topic/libraries/support-library/revisions#28-0-0-alpha1

注意如果项目中引用了

compile 'com.google.android.material:material:1.0.0-alpha1'

会同时引入 android x ,会和support 包冲突。

如下文blog :

https://juejin.im/post/5afbd66ef265da0b7d0b8e5f


 类似资料: