Sometimes When we want to Create New Module for your Android app , we face error error of “project needs to be converted to androidx.* dependencies” .
As i show here in the image
here is the method to resolve this error .
Follow the below Steps:-
1. Click on Refactor.
There you will see many option as in the below image.
2. Click on Migrate to AndroidX…
On clicking on it either you will see the window to change the gradle targetsdkversion and compile sdkverion or you will see window to Create backup zip file of your project and option to Migrate to AndroidX.
If you suggested to change sdkversion then you need to change it firstly before Migrating to ANdroidX, After updating Sdkversion follow the steps again from step one , Now you will see option to backup project code to migrating to AndroidX.
Or if you Directly get window to save backup for project to Migrate to ANdroidX as in the below image , then you need to save you back and Click on Migrate Button .
3. Click On do Refactor Option.
After clicking on Migrate Option you will see an Option in the bottom left corner of the Android Studio to do refactor .
you just need to click on that and that’s all .
your issue for project needs to be converted to androidx.* dependencies will be resolved successfully.
And you can add new module Now to your Code .
Happy Coding 🙂