Migrating to AndroidX
Hello Everyone,
In this tutorial we are going to see how to migrate an existing project to AndroidX.AndroidX stands for Android Extension. AndroidX is nothing but the updated and optimized version of Android support libraries.Before updating to androidX we have make sure the following requirements.
Android studio version should be Higher than 3.2
TargetSDK verion and compliedSDK version should be 28 or greater
If your android studio version is 3.2.x you have to use gradle build version 3.2.1. If you are using android studio version 3.3.1 then your gradle build version should also be 3.3.1. If any mismatch happen in version means it will throw error.
classpath 'com.android.tools.build:gradle:3.2.1'
For details on build version refer :https://developer.android.com/studio/releases/gradle-plugin
Now lets move in to the migration process,
- Click Refactor from menu options in Android studio.
- Click Migrate to Android X from Refactor

3.It will ask us to create a backup zip file and proceed with backup process. Click migrate

4. Now this will show the refactor window with the list of all the files using android support libraries. Just click Do Refactor and relax.

5. Now you can see all the support libraries used in the project have been imported to AndroidX dependencies.
For more details on artifact mapping from old to new dependencies refer : https://developer.android.com/jetpack/androidx/migrate
Thanks.