The App Module Contents
The app/
directory contains the files necessary to build your app:
Most of the time, you will be working in the src/
directory, which contains the source code and other files that you will be creating and editing to define your app.
The build/
directory here is similar to the build/
directory that is under the HelloWorld/
root directory. It contains the output of building your app. In this case, we will use this build/
directory a bit more often, as it contains the actual app itself that we can distribute through the Google Play Store or other app distribution channels. We will examine this build/
directory a bit more later in the book.
In a typical starter project, the libs/
directory is empty. It is there to support some old ways of attaching libraries to your module, for code written by others that you wish to use. We will explore what libraries are and what ones this project uses in an upcoming chapter.
The build.gradle
file, like its counterpart in the HelloWorld/
root directory, contains Gradle instructions for how to build your app. We will examine this file in detail later in the book.
The .gitignore
file, like its counterpart in the HelloWorld/
root directory, identifies files and directories that can be skipped when putting this project into a Git repository. While you may need to maintain this file if you are using Git, using Git and .gitignore
is outside the scope of this book.
Last, the proguard-rules.pro
file is there in support of ProGuard and related tools. These are used in Android project for two reasons:
- They help to reduce the size of the apps, by eliminating stuff from libraries that we are not really using
- They “obfuscate” the code in the apps, to make it slightly more difficult for people to “reverse engineer” the apps and figure out how they work
Until you are ready to think about distributing your app to other users, though, ProGuard and similar tools are not necessary. Hence, we will postpone looking at that stuff until much later in the book.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.