I want to make a separate module so I can share it between projects. The module is going to have android components. So upon creating a new module the options are Phone & Tablet module and Android Library. I wanted to know what's the difference between the two. thanks
-
`I want to make a separate module so i can share it between projects` Android Library makes more sense. – Enzokie Aug 29 '17 at 22:44
-
Yup i agree, but whats the difference between both ? – Zeyad Gasser Aug 29 '17 at 22:58
-
Phone & Tablet, Android wear, Android TV modules are intended to be your actual app project while the Android library module is intended to be shared across multiple projects/module (just what you needed). E.g. if your Phone app and Smart watch app shares a similar implementation then using an Android library can modularize and centralize the implementation. – Enzokie Aug 29 '17 at 23:12
2 Answers
What is Module? From the Add a Module for a New Device documentation:
Modules provide a container for your app's source code, resource files, and app level settings, such as the module-level build file and Android manifest file. Each module can be independently built, tested, and debugged.
What is Android Library? From Create an Android Library documentation:
An Android library is structurally the same as an Android app module. It can include everything needed to build an app, including source code, resource files, and an Android manifest. However, instead of compiling into an APK that runs on a device, an Android library compiles into an Android Archive (AAR) file that you can use as a dependency for an Android app module. Unlike JAR files, AAR files can contain Android resources and a manifest file, which allows you to bundle in shared resources like layouts and drawables in addition to Java classes and methods.
You can't access the components from one module to another module. So, if you need to share components between projects, you need to create Android library. But please remember, you can't run the library. You only can access and use it from the module. Furthermore, you can use Gradle Android Maven plugin to install your library locally.

- 28,609
- 11
- 78
- 96
Check the official doc
Resume: Modules provide a container for your app's source code, resource files, and app level settings, such as the module-level build file and Android manifest file. Each module can be independently built, tested, and debugged.
Android Studio uses modules to make it easy to add new devices to your project. By following a few simple steps in Android Studio, you can create a module to contain code that's specific to a device type, such as Android Wear or Android TV. Android Studio automatically creates module directories, such as source and resource directories, and a default build.gradle file appropriate for the device type. Also, Android Studio creates device modules with recommended build configurations, such as using the Leanback library for Android TV modules.

- 5,357
- 2
- 27
- 49