我正在编写 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/