Migrating to AndroidX

Nagendra Hari Karthick
2 min readFeb 15, 2019

--

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,

  1. Click Refactor from menu options in Android studio.
  2. 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.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Nagendra Hari Karthick
Nagendra Hari Karthick

No responses yet

Write a response