Android Large Scale Project - Can I split multiple library projects?

I am going to develop a very large-scale android project that has thousands of classes and resources. I plan to divide the application into modules and develop them separately as library projects. Combine them later. (The application may contain 5-6 modules, so we plan to create 5 - 6 library projects and combine them)

Is this approach appropriate? or androids, please suggest a way to support and develop such a large project?


Edit:

Libraries contain common code for several applications → Yes, I agree 100% true

But this project is like a combination of several projects. This is something like this:

The Home Screen control panel has 8 buttons, which are 8 modules, you click on one button → it opens activity and has its own thousands of fragments, layouts, drawings, etc., which are independent of other modules.

I also have non-interdependent use cases that can be easily separated, and 4 to 5 developers will be involved in this project, so if I can separate myself from several library projects, I can simply easily distribute developers based on modules (library projects)

Thus, one approach is to create one project and create a package structure modulo com.name.something.Module1

in this package i have

com.name.something.Module1.activity com.name.something.Module1.util com.name.something.Module1.widget com.name.something.Module1.data com.name.something.Module1.dao 

and module 2

 com.name.something.Module2 com.name.something.Module2.activity com.name.something.Module2.util com.name.something.Module2.widget 

and etc.

so this is the first approach, but each module has thousands of classes and resources, layouts of xml files, etc.

Another approach is to separate modules as library projects. I do not know how large projects support their code base, for example, facebook, twitter, etc.

Please inform.

+4
source share
2 answers

Libraries contain common code for several applications ... if you are completely focused on one application, then it makes no sense to split your code into 5-6 library projects.

One of the common ways in which Android developers separate their project from creating subpackages for different components. For example, the custom View and adapter come in com.package.name.ui , utility packages go in com.package.name.util , etc. Other than that, you just need to be smart ... starting an application from scratch that will have “thousands of classes” sounds pretty ambitious, and there really isn't a single piece of advice that will make your life easy.

+1
source

Are each module separated from each other or share data (for example, the same database)? If they are separated, I would suggest creating 8 separate applications, which will reduce the memory size of your application and improve startup time.

If some or all use the same database, you can create the database on the SD card and use it from each individual application.

+1
source

All Articles