7 Basic Files In Android Studio Should know As a Beginner.

These Following files are the basics files which should be known as a beginner.

1. activity_main.xml

activity_main.xml is the xml file which is going to open as first screen when you open the application.It is by default created file when you create new project.

activity_main.xml.

2. MainActivity.java

MainActivity.java is the java file which handle the operation which are going to perform in activity_main.xml.We connect java file to xml file with setContentView(R.layout.activity_main);this code.It is by default created file when you create new project.

Mainactivity.java

3. AndroidManifest.xml

The Manifest file describes essential information about your application to the Android build tools.It contains information of your package ,including components of the application such as activities ,services,broadcast receivers etc.

AndroidManifest.xml

4. colors.xml

This xml file is used to store the colors for the resources.When you define color here,You can use that color anywhere in the project by calling its name only like color/red.

colors.xml

5.styles.xml

This is another important file used by the developers.In this file all the themes of the Android project are defined.The base theme is given by default having the option to cutomize.

styles.xml

6. strings.xml

This xml file is one of the most important as well as widely used values file.Define the strings in this file so that it is easy to use same string in different positions in the android project.

strings.xml

7. build.gradle

This gradle file is used to automate building,testing ,deployment etc.It is used to apply appropriate tools.eg.convert the java files into dex files and compress all of them into a single file known as apk that is actually used.

build.gradle

Published by Pradeep Bardewa

Senior Software Developer. Pune-Shillong-Nepal.

Leave a comment

Design a site like this with WordPress.com
Get started