'How to migrate android module to androidx?

This android project has lots of modules, when I do Refactor->Migrate to androidx, source codes from module "app" upgraded, Only app module auto migrated

but codes from modules are never migrated...

Now have to fix it buy lots of manual replacement. Any idea how to migrate these modules? Thanks for your help.



Solution 1:[1]

Check if you added this code android.useAndroidX=true in gradle.properties.for more details please refer this link

Solution 2:[2]

Anyway, thanks, I solved it by doing migration first on a refresh copy without doing anything to gradle versions.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rohini
Solution 2 alex j