Chapter 7Multi-Module Projects

WHAT'S IN THIS CHAPTER?

  • Adding modules
  • Phone & Tablet module
  • Android Library module
  • Android Wear module
  • Android TV module
  • Glass module
  • Android Auto module
  • Google Cloud module
  • Importing modules
  • Removing modules

Previous chapters dealt with general concepts of application development in Android Studio; this chapter covers the capabilities of Android Studio to work on multiple modules in your Android project.

In addition to the core module you created, you will eventually need additional modules when you want to add support for other Android devices. For example, you might want to add Wear, TV, or Auto modules in your Android Studio project, or even third-party Android libraries.

This chapter explores the details of adding Phone & Tablet modules, Android and Java libraries, and Wear, TV, Glass, and Google Cloud modules. Then the chapter covers importing Gradle and Eclipse projects. AAR and JAR packages are covered as well to help you understand how to include them in your Android Studio projects.

Android Studio works on a module-based project structure, which means that it can handle multiple modules in one project. Having multiple modules in an Android Studio project enables you to work on one project instead of multiple projects so your development team can create a more organized application.

Prior to Android Studio, Eclipse handled multi-module projects with a workspace concept. Eclipse projects do not need to reside in the same project folder ...

Get Expert Android Studio now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.