Support library dependencies in Android Q
Support libraries will not be updated past 28. You need to migrate to androidx.
See support library documentation where it says:
Note: With the release of Android 9.0 (API level 28) there is a new version of the support library called AndroidX which is part of Jetpack. The AndroidX library contains the existing support library and also includes the latest Jetpack components.
You can continue to use the support library. Historical artifacts (those versioned 27 and earlier, and packaged as android.support.*) will remain available on Google Maven. However, all new library development will occur in the AndroidX library.
error crash implementation 'com.android.support:appcompat-v7:28.0.0'
How about migrating to AndroidX by selecting Refactor > Migrate to AndroidX
and let the refactor do the work
It seems you don't want to migrate to AndroidX but you should give it a try, since android support 28.0.0 is the last release and android will only update androidx from now.
https://developer.android.com/topic/libraries/support-library/revisions#28-0-0
This is the stable release of Support Library 28.0.0 and is suitable for use in production. This will be the last feature release under the android.support packaging, and developers are encouraged to migrate to AndroidX.
What is the AndroidX equivalent of support-compat library?
That would be
implementation "androidx.core:core:1.3.2"
You can find a list of all the mapping to AndroidX at https://developer.android.com/jetpack/androidx/migrate/artifact-mappings
Can I use library that used android support with Androidx projects.
You can enable Jetifier
on your project, which will basically exchange the Android Support Library
dependencies in your project dependencies with AndroidX
-ones. (e.g. Your Lottie dependencies will be changed from Support to AnroidX)
From the Android Studio Documentation (https://developer.android.com/studio/preview/features/):
The Android Gradle plugin provides the following global flags that you
can set in your gradle.properties file:
- android.useAndroidX: When set to true, this flag indicates that you want to start using AndroidX from now on. If the flag is absent,
Android Studio behaves as if the flag were set to false.- android.enableJetifier: When set to true, this flag indicates that you want to have tool support (from the Android Gradle plugin) to
automatically convert existing third-party libraries as if they were
written for AndroidX. If the flag is absent, Android Studio behaves as
if the flag were set to false.
Precondition for Jetifier:
- you have to use at least
Android Studio 3.2
To enable jetifier, add those two lines to your gradle.properties
file:
android.useAndroidX=true
android.enableJetifier=true
Finally, please check the release notes of AndroidX, because jetifier
has still some problems with some libraries (e.g. Dagger Android): https://developer.android.com/topic/libraries/support-library/androidx-rn
Android Material and appcompat Manifest merger failed
Just change "rc01" in first and last line inside dependencies to "alpha1"
This is working for me
Related Topics
Install_Failed_Update_Incompatible When I Try to Install Compiled .Apk on Device
How to Use Apply a Custom Drawable to Radiobutton
How to Programmatically Add Buttons into Layout One by One in Several Lines
How to Rotate the Android Emulator Display
Android Webview Style Background-Color:Transparent Ignored on Android 2.2
Emulator Error: This Avd's Configuration Is Missing a Kernel File
How to Convert Views to Bitmaps
Android Gettext from Edittext Field
Webview, Add Local .CSS File to an HTML Page
Android Studio - Android Emulator Wifi Connected with No Internet
How to Display Custom View in Actionbar
How to Change the Default Icon on the Searchview, to Be Use in the Action Bar on Android
How to Globally Force Screen Orientation in Android
What's the Android Adb Shell "Dumpsys" Tool and What Are Its Benefits
Showing Empty View When Listview Is Empty
Restrict API Requests to Only My Own Mobile App
How to Get the List of Mounted External Storage of Android Device