The directory structure of Android Studio
Here you will learn about all the directory structure of Android Studio. We have divided it into two parts so that you can learn it in detail and in a good way. You need to now directory structure of it to learn Android mobile application development.
Let's start
When you create a new project you'll see some folders on the left side menu of your Android Studio.
Here you can see the folder of the app right now and the second one is Gradle Scripts. Basically, when we work on the project, it doesn't just have these folders, there are many more besides.
In the project view, we have a directory structure like this.
When you create a new project you can see the folder of the app right now and the second one is Gradle Scripts. When you extend more to the app folder, you will get four more such folders.
app
- manifests
- java
- generated java
- res
Manifests
First, I will tell you what this manifests directory is, and what is the use of the file you are looking inside in it.
Here I tell you one thing, there is not only one language in Android development, but there is also an XML language for front-end designing and for logical aspect Java language is used as a back-end coding. Android Studio also provides such a facility to include KOTLIN OR C++ as operational, but by default, Java is used. That is way in its directory you will find some files in.XML extension and some files will in .java extension.
Here you can see inside manifests folder an AndroidManifest.xml file.
AndroidManifests.xml file
When you open this file, you will see that it already has the code inside it and your package name will also contain it. You will notice that your package name has been used several times throughout the project.Well, this AndroidManifest.xml file contains basic information about your project. In it, you will find the icon of your application, application name, and styling of your theme. Secondly, your application is declared here and you can set up your application here. Application permissions are also given here. For example, if you want your application to access the internet, you will write permission here.
There are three main tasks that are contained within this file. We will tell you the rest.
Java
As I told you, whatever the back-end code is, it's in Java. When you extend java folder you'll see three different packages, like this
These two packages, which are now visible below are for testing purpose, on this pic you can see in brackets that one on the AndroidTest and the other on is Test. But if you extend the number one package, you will see that it has a Java file inside it that you created activity. You see that java file name is exactly the same as your activity name. That means this file will have a backend code for that activity. Whenever you create a new java file, you will come to this same Java folder and by right-clicking, you will create a new java file.
The rest we will learn in part 2.
I hope that as I have told you, you will understand it and you will be practicing it.
If there is anything you do not understand or you have any questions about this topic or any previous topic you can leave your comment below.
Thanks!
0 Comments