Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migration to androidX missing in Android Studio

I am trying to migrate my project to androidX. The project i am trying to migrate is based on android support libraries AppCompat. In the Developer Documentation it says that you can migrate to AndroidX by doing the Following: Android Studio -> Refactor -> Migrate to AndroidX But when i am following these steps, i end up at Refactor, because i only have got the option Migrate to AppCompat. I am not sure what to do.

Additional Info:
Android Studio Version: 3.1.4(Stable Channel)
Android SDK Tools Version: 26.1.1

Thanks for any help!

like image 280
laim2003 Avatar asked Aug 11 '18 09:08

laim2003


People also ask

How do I enable AndroidX?

With Android Studio 3.2 and higher, you can migrate an existing project to AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar. The refactor command makes use of two flags. By default, both of them are set to true in your gradle.

Do I need to migrate to AndroidX?

The Android Support Library has reached the end of its life. 28.0 was the last release of the Android Support namespace and the namespace is no longer maintained. So, if you want bug fixes or new features that would have previously gone into the Support Library, you need to migrate to AndroidX.

What is the difference between Android and AndroidX in Android Studio?

AndroidX is a major improvement to the original Android Support Library, which is no longer maintained. androidx packages fully replace the Support Library by providing feature parity and new libraries.


2 Answers

"Refactor to AndroidX" option is available for AndroidStudio 3.2 stable and later. https://developer.android.com/studio/

like image 86
Tuby Avatar answered Oct 28 '22 08:10

Tuby


Switch to "Android" or "Project" tab in the file navigation window. And right click on your parent folder and go to refactor, there listed "Migrate to android" option. It is very simple. In case of any mistakes in migration we can switch back to appcompat version using "migrate to appcompat" under same menu.

like image 26
Anbarasu Chinna Avatar answered Oct 28 '22 06:10

Anbarasu Chinna