Thursday, October 13, 2016

Explore Android app project source code folders

When you created the first android app with Android Studio, the system will create automatically several folders and files as the minimum requirements for your app to be build and run successfully.

In the picture below you can see several folders and files created automatically by android studio.


Android App project folders and files


All this folder is very important and crucial to android development. Don't try to delete or rename these folders and files.

All these folders have their own specific purpose to make developer easier in managing the source code.

1. AndroidManifest.xml is the most important file of all. You can edit this file to add activity, service, broadcast receivers, permissions and etc. You specify the first activity (the first page) your app will display in this manifest file. If you call an activity without added to manifest file your app will crash.

2. Java folder is where all the .java files is put under. You edit the java source code to control logic of the application. Since android uses java as the programming langguage what you do in java here is the same as you do with java programming.

3. res is the folder where you put all resources of your application. resources includes images, videos and sounds.  for example images of type .jpg or .png you put in drawable folder. layout folder is used to put all the layout files. layout is made in xml language and you put under layout folder. mipmap is the folder where you put your app icon. this icon will be shown at home screen of android phone after you install on android device. values is the folder where you put all string variables when you use string text to display in your app. values also contains color hex files for you to refer to what color to use in your layout.

4. Gradle Scripts is the folder where you add library to your application. In build.gradle(Module app) you specify the minimum sdk for your app, version code and many other things. if you want to include third party code in you also put the link of the library to this gradle file.


I think that is all you have to know as the basic understanding to make an app in android.


Thank you for visiting our website. Just comment below if you have any question to ask.








No comments:

Post a Comment