android - 我必须使用 Android X 吗?

标签 android android-support-library androidx

我正在编写 Android 应用程序并使用

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

我尝试连接 Firebase,但它说使用 Android X。我必须使用它吗?我正在使用第 3 方库,这是 Android X 上的问题吗?如果我必须使用 Android X,我怎样才能安全地使用它?

Edit:

我的build.gradle:

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.0.3'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.firebase:firebase-messaging:17.3.4'

最佳答案

是的,您必须使用 androidX

使用 Android Studio 3.2 及更高版本,您可以通过从菜单栏中选择“重构”>“迁移到 AndroidX”来将现有项目迁移到 AndroidX。

重构命令使用两个标志。默认情况下,它们在 gradle.properties 文件中都设置为 true:

android.useAndroidX=true Android 插件使用适当的 AndroidX 库而不是支持库。 使用 Android Studio 3.2 及更高版本,您可以通过从菜单栏中选择“重构”>“迁移到 AndroidX”来将现有项目迁移到 AndroidX。

重构命令使用两个标志。默认情况下,它们在 gradle.properties 文件中都设置为 true:

android.useAndroidX=true Android 插件使用适当的 AndroidX 库而不是支持库。 android.enableJetifier=true

关于android - 我必须使用 Android X 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57959251/

相关文章:

Android MapView 具有高分辨率图 block ?

Android ListView 椭圆宽列内容

android - Eclipse 和 Android SL GridLayout 无法协同工作 - "android.support.v7.widget.GridLayout could not be instantiated"

android - 迁移到 androidx 后错误膨胀类 androidx.appcompat.widget.FitWindowsFrameLayout

android - 如何获取 DisplayCutoutCompat 的实例

android - 应用程序关闭时,Android 媒体播放器如何继续播放歌曲?

android - 渐进式 Web 应用程序与原生应用程序在 Android 上具有哪些功能,反之亦然

Android - 支持库 - 没有显示 ActionBar 项目

Android 背景在第一个实例中未正确应用

java - 在旧版本的 android studio(即 3.1.2)上迁移到 androidx?