Project creation using android studio hello If you are beginner and do not know how to create a project in android studio then this is a tutorial for you. Android studio provides graphical tool for creating and managing projects.In which define all project and project source code .Each project contain different modules.You need to create an Android project for any  android application.

Android studio

Studio can be downloaded from the below link.

https://developer.android.com/sdk/index.html

These guide explain how can create project in android  studio .Click on start menu and select  <All program option> and find out folder < android studio > then click on <android studio>after this step a new window  will open that will show in below pic Then you  will click on start a new android studio project. for more detail  click on built project

step 1 Project creation using android

After you click start a new android studio project. Then another window  will appears. In this window you will set application name and package name and click next.

Application name

The name that will appear in the app launcher and that will appear in the Settings.

package name

Namespace of the package corresponding to this project. It must be a fully qualified package namespace. Each application in the system must have a unique package name. you can edit the package independently.

project location

Location in which file of a project is save.

Company Domain

This will represent the package name in our project.if you can publish the app in play store then you can use exact  company Domain name .if you can use  as a learning purpose then you can assign any name.

Step 2 Project creation using android

Alt Tag  android development name of project

After appears a new window . In this window you specify the project categories. you can create application for Phone or  tablet, TV and wear devices. Our first application for phone and tablet so that s why I select phone and tablet option.

Minimum Required SDK:

A software development kit that enables developers to create application in android.The minimum API Level required to properly run your application.The minSdkVersion level is NOT the Android version number. Some Android platforms that we will use and the corresponding SDK number.

API: Android 2.0(Eclair)

Lower API levels target more devices but have fever future available. By targeting API and later your app will run on approximately 100% of the devices that are active on Google play store.

So I can change into (kitKat)

Lower API levels target more devices but have fever future available. By targeting API 19 and later your app will run on approximately 24.5% of the devices that are active on Google play store. Number of different API are given .You select the API according to choice and click next.

Step3 Project creation in android

Alt Tag  android development set SDK  3

If you have newcomer in project creation using android you may confused term activity .Activity is a basic building block in android. In android applications numbers of activities are given.

Activity contain two files first is java class file and second is XML file. All the coding parts and logic used in java class file and  XML file used for designs .So  we select blank activity and click next.

Step 4 Project creation using android

Alt Tag android development set blank activity

Then appears a new window

Main Activity is represents java class file and start with capital letter. You can change the activity name According to choice. Layout  represent XML file in our project yo will  specify layout name in small latter. You can change Layout name According to choice. And click finish

Step 5 Project creation using android

Alt Tag  android development assige name to activity

Then our project is appears in android studio

Two files are appears in android studio

First is java class file

A Java class file is a file with the (.class file name extension) In java class file all coding and logic that use to built an application.

Second is Layout file

It holds all the elements or the tools that you want to use in your application Like the Text Views  buttons and other UI (user interface)elements. Basically define the actual user interface of application. Xml is used to define different styles.

Step 6 Project creation using android

Alt Tag android development first layout 6

  After Project creation using android

Setp 8 :In this example we are going to show when you click on a button and show a message

After Project creation in android studio So you will find out  java folder expand this java folder. here is package name click on package name (for example project name is first application)  First of all you will create a new project in android studio.  Every project contain two file first is java class file and second is layout XML File. Your first step is open a layout XML file.

Our first target is show a message in screen for example (Greeting appears here)

So

  • First step is to create a Relative layout and set height and width of that layout.
  • Second step using <edit text tag> to create a text view and set height and width.
  • Third step create a button<Button tag>
  • Forth step when user click on a button show message
  • Create the layout of the Main Activity

Let start our first step click on main activity

Alt Tag android development main activity xml

And paste the following code into layout XML.
In this example we are going to create a simple UI that includes only (Text View) with Different attributes.
Now you may open the Graphical layout editor to preview the User Interface you created.

Alt Tag click  android development on button

Now you have write the code  in java class file click on main activity and placed that code

Alt Tag android development main activity
 Code that are placed in java class file
Define the on click

Now we define the on click method when user click on a button show message.

Run the application

Alt Tag android development click on a button

 Now when you press the  (show Greeting button) message show this is my first app

Alt Tag android development click on button show output

 

Thank you  for reading this lecture Hope you got the idea.