Here, I am gonna explore coding, Debugging, Error fixing, My articles and other technical posts. So stay tuned.

Creation a new project in Android Studio | Making new project in Android Studio with full explanation.

No comments

Creation new project in Android Studio with full explanation.

There is a lots of tutorial on internet that they show you how to create a new project on Android Studio. But whats new in this post is that i will explain every thing which you see in every window of creating a new project.
So This is going to be the first post related to Android studio Tutorials. 

Before we start let me give you the link of android Studio So Download it and we will go ahead 
So now i suppose that you downloaded the Android Studio. Install it and Run it.Create a new project
When you Run android studio. you will see there is a tab called create new project.

  • Click on the Create new project when you will click that you will see something like this as shown in the image below.

so in the image there is some numbers and let me explain one by one 
1. So,There is a text field there which says Application Name So as the name say. Here we need to enter the name of the Application.
2.  Second is may be little bit confusing. don,t worry i will tell you whats that. so second text field says Company domain. so if you have any company (Example: Microsoft) then write or if you don't the let that thing default. Basically what that thing is that is the name of your company or your domain which will be shown in the Play-Store below the name of your app.
   3. Location of your project as the name says. you need to set the location where you want to  place the project or you can leave it default.
Basically when your project will be created then on that location you will the android studio make some folders and there folder is basically your android app.
4. There is a check box which says to include the C++ support. Like if you are good in C++ the you can include the can code in C++ 
5.  Kotlin it is the New language introduced in September 2017 by google For Android so if you wanna include the kotlin in the project then click that check box.
6. That is the warning massage 

  •  Hit Next when you will done with the first window and  move on to the next one. Now there will be the new window opens which says Target Android Device as Shown in image below.  

So now in this window we see there is 4 sections which is highlighted.
so first one is impotent instead of others
  1.  So the first option says to select the SDK and Devise. So as we making the app for android mobile device. We can also make the app for wear, TV But for now lets select the Phones and tablets.When you check on phone and tablets then you need to select the API level (Application Program interface) which we can say Android version.So question is which api level we need to select. The smaller your api level is then is maximum chance that you app will run in may devices. If you select latest version like oreo then there is very less users of oreo and your app will run only in orio version.If you select the lower version/API level like ice cream sandwich then your app will run in all ice cream sandwich and the lower once.
  2. In the second section you can select the check box for wear. and its API level
  3. Here you can select this box if you want to make app for TV.
  4. In the last section you can select for other android devices like now a days android we can use in cars. 
After the you if you select the device and API level then Hit Next and lest move on to the next window.

  • New in window is for selecting an activity

  So Now the question is what is an activity. In easy words like in PC there is window of some software / application and in android we say activity. Like a site is collection of web-pages linked with each other like that an android app is nothing just a collection of activities linked with each other.
There is lots of activities available here which is created by android studio. we can select any for now lets select Empty activity.And click next.

  •   New we at the last step of the Creating new project.

Again there is 4 Number which i have given in the image so lets explore the last step one by one:
  1. First text box is to give the name of your java file or main activity file Basically when we create an android app we design a layout in Xml and code in Java / kotlin so this first text box is for giving the name to java file.
  2. Second is the check box which tells to generate the layout file we need to tick this one because yes we want to make a layout file so as to work on xml.
  3. Then the third one is to to name the layout file name. basically here we give the name to xml file.
  4. Android apps can be backward-compatible without checking this checkbox.If false, this activity base class will be Activity instead of AppCompatActivity Android studio is letting you know that if you uncheck the "Backwards Compatability(Appcompat)" box, then you'll be including & using the library Activity instead of AppCompatActivity. For a more detailed comparison between the two, check this: Activity, AppCompatActivity, FragmentActivity, and ActionBarActivity: When to Use Which? Generally, what do android developers prefer? enabling backwards compatibility or without it? A comment written by "CommonsWare" explains this best An activity created with that checkbox checked is no more backwards compatible than is one without that checkbox checked. Checking the checkbox gives your app a particular look and feel that will retain that look and feel on some older devices; leaving the checkbox unchecked means that some aspects of your look and feel will be different on pre-Android 5.0 devices. This does not impact the core functionality of the activity. 
        After doing these two steps
Then hit finish and your project will be build in 2-3 minuets.

Please don't forget to Share this post with you friend who want to learn something.

No comments :

Post a Comment