Android Modules Flashcards
What is module?
Provides 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.
the default module name is “app”.
Different Types of App Modules
Phone & Tablet Module
Wear OS Module
Android TV Module
Glass Module
Feature Module
Represents a modularized feature of your app that can take advantage of Play Feature Delivery. For example, with feature modules, you can provide your users with certain features of your app on-demand or as instant experiences through Google Play Instant.
Library Module
Provides a container for your reusable code, which you can use as a dependency in other app modules or import into other projects. Structurally, a library module is the same as an app module, but when built, it creates a code archive file instead of an APK, so it can’t be installed on a device.
Android Library
This type of library can contain all file types supported in an Android project, including source code, resources, and manifest files. The build result is an Android Archive (AAR) file that you can add as a dependency for your Android app modules.
Java Library
This type of library can contain only Java source files. The build result is an Java Archive (JAR) file that you can add as a dependency for your Android app modules or other Java projects.
Google Cloud Module
Provides a container for your Google Cloud backend code. This module has the required code and dependencies for a Java App Engine backend that uses simple HTTP, Cloud Endpoints, and Cloud Messaging to connect to your app. You can develop your backend to provide cloud services your app needs. Using Android Studio to develop your Google Cloud module lets you manage app code and backend code in the same project. You can also run and test your backend code locally, and use Android Studio to deploy your Google Cloud module.
For more information on running and deploying a Google Cloud module, see Running, Testing, and Deploying the Backend.
Some people also refer to modules as sub-projects and that’s okay, because Gradle also refers to modules as projects. For example, when you create a library module and want to add it as a dependency to your Android app module, you must declare it as follows:
dependencies { compile project(':my-library-module') }
Project Structure in Android View
manifests
java
res
Android Project View
build libs src --androidTest --main AndroidManifest.xml java/ jni gen res assets --test build.gradle (module) build.gradle (project)