Reputation: 786
The modules in Android Studio are all defined in settings.gradle which is in root directory of a project. But why are they different? I mean why a module is android library or main module.
I hope I explained my question clearly. If not, please let me know. I really want to figure it out.
I tried adding an launcher activity in android library module, but it cannot be changed to a regular module. I want to know can I change a library module to regular module ?
Thank you
Upvotes: 2
Views: 53
Reputation: 1289
An android library is supposed to be used by other modules and it cannot be launched on its own. While a regular module has a launcher activity defined which is launched everytime you click on the application icon
If you are using gradle you need to change
apply plugin: 'com.android.application'
to
apply plugin:'com.android.library'
Upvotes: 2
Reputation: 786
Thank you for Ajit Pratap Singh. His answer solved my problem. At the top line in build.gradle files of each modules, there is "apply plugin:" text defines which type of module it is. like 'com.android.application' is regular module, 'com.android.library' is library module.
Upvotes: 0