1

Dynamic Feature Module folders

While checking out this tutorial i saw that feature modules are inside an outer module called features. Is it possible to create such a structure with Android Studio, or is it done by creating a features folder manually and adding those feature modules manually and setting gradle file afterwards?

Thracian
  • 43,021
  • 16
  • 133
  • 222

2 Answers2

2

Not sure about it can be done by Android Studio but the simple way following these steps

  1. You create a Module as normal from Righ Click in app folder
  2. Create Directory with name features, switch to Project structure view and move your Module Directory to features
  3. If you using dynamic-feature-module you have to change in settings.gradle file and build.gradle app.
Công Hải
  • 4,961
  • 3
  • 14
  • 20
  • Yes, it's like i thought but using Project structure to move modules makes it one step shorter than i anticipated. – Thracian Jun 30 '20 at 10:29
  • Haha agree with you, if android studio can support we config path when create module so we no need move module directory manually – Công Hải Jun 30 '20 at 10:31
2

you can do this while mentioning module name.

First create a directory

e.g feature in root level

then Create new module

in module name:- feature:module-name

Amit kumar
  • 149
  • 14