Understanding the Android project structure
If this is your first time looking at the Android project folder, you might wonder where to add your code and what the packages mean. This recipe will walk through what each folder holds and what code goes where.
Getting ready
If you open your project, you will notice many folders. The main folders in your Android project are listed here:
- The
manifest
folder - The
java
folder (test
/androidTest
) - The
Res
Resource
folder Gradle Scripts
How to do it…
Let’s navigate through each folder as we learn what is stored, where, and why:
- In Figure 1.14, you can see the Packages dropdown; click on that, and a window with Project, Packages, Project Files, and more will pop up.
- You can opt to view your project using the Android logo, via Project, or the
Project
highlighted section next to the drop-down menu. The Project view is best when you have many modules in your application and want to add specific...