Member-only story
How to Organize Android Package / Folder Structure?
Of course, this is very personal. There is no right or wrong how you would like to organize your Android source code
2 min readOct 29, 2021
I prefer to organize my source code based on recommended Android app architecture, which is also known as MVVM architecture.
Image source: MindOrks
This is what my package/folder structure looks like in Java root folder.
This works for a small app, which is exactly what I’m doing now. However, I imagine if your app is huge and contributed by many developers, you may want to break it down into different modules/features instead.
Module1
└─── ui
└─── viewmodel
└─── repository
└─── local
└─── remote
...
Module2
└─── ui
└─── viewmodel
└─── repository
└─── local
└─── remote
...
...
This allows your modules to be exported or shared as generic libraries easily in the future. Since my app is…