Directory structure in Android Studio - Codiclick

share

Directory structure in Android Studio

In a previous entry we saw how to create our first project on Android, this time we will see what the project directory structure is and what are the main elements to take into account.

Adverts


By default, the project is created with the following structure and presents us with 2 tabs, MainActivity.kt Y activity_main.xml.


These 2 tabs correspond to the kotlin file that will have the logic of our system (called Activities) and the file that will have the app's graphical interface (called Layout).


At the top of the environment we can see the name of the project and if we hover over it, we will find the path where it is saved on our computer.

Observation: if you want to access directly, we can right click on apps and we searched Opened in and we select explorerthis way the project directory is loaded.

Directory structure.


On the left side we find the structure of the project's directories, here we see that it contains the folder at the root apps which represents the project and within it we see manifest, Java, meat Y Gradle Scripts which in turn contains other important directories or files for our application.


By default, it is loaded in the “Android” view, but we can change the view according to our needs to any of the available ones.



For now it is recommended to work on the “Android” view that gives us the base structure to work with our applications, let's see what the directories that are seen there consist of.

  • manifest: This folder contains the AndroidManifest.xml file that contains the project's metadata, corresponding to the general information of our application, indicating the application's name, icon, theme, associated activities, among others (this file must not be modified if is not aware)
  • Java: This directory contains the project's activities and/or packages, corresponding to the app's logical classes, if we select the java programming language then we will have files with a .java extension, if we select kotlin they will be files with a .kt extension, like this one. We could add the unit test files to the app ourselves.
  • meat: Corresponds to the space where the entire graphic part of the app will be managed in terms of screens (layouts), orientation, images, icons and resource files such as xml files for colors, texts, themes, among others.
  • Gradle Scripts: Here are the app's configuration files, for example the build.gradle file where we manage the project's dependencies or necessary libraries for the app, the project's version, configuration elements, build version, among other elements.

And until this entry is over, in the next one we'll see how to create a virtual device to emulate our applications.

It may also interest you.




Is there anything you want to add or comment about this entry? feel free to do….And if you liked it... I invite you to share Y Subscribe by clicking on the “Join this site” button to hear more posts like this one 😉