Creating New Project in Android Studio

Say good bye to workspace, welcome to modules.

From now a days, we will develop any code in Android Studio. For that, today I'll teach you, how to create android project in Android Studio.

Download Android Studio and install in your system with JAVA installed.

After installing Android Studio, create new project as shown below:


Then you can see below screen:


Here there are 4 fields:
  • Application Name: App name that you see when you install an app
  • Company Domain: You can set any domain
  • Package Name: This name will be unique for each app. That is auto-generated as you type Application Name, it refers as per Company Domain. You can manually edit it.
  • Project Location: Source directory of your project.
Click Next, you will see below screen. This is screen for asking which types of devices does support your app. By default, its set to Phone and Tablet and set to your minimum SDK Version.


Other options are:
  • Wear: For wear devices like Android Smart Watches
  • TV: For Smart TVs
  • Auto: For Android Auto (Android Cars)
  • Glass: For Google Glass
As you can see, while selecting Minimum SDK, it shows that your app will support how many devices through play store market. That will help you to choose minimum SDK version.

Click Next. There is a dialog to choose default activity.



I'll recommend to choose Empty Activity or as per your need. But If you are not sure to choose any activity, skip this and click Next. You will see below screen:



Type your Launcher Activity name and its layout name as you want. Click Next. Finally you have done to create new App using Android Studio. And This is your home page for newly android app.



Open your app's activity_main.xml, that's layout and MainActivity.java. Its like this:



That's it.. Go ahead with your code. Run this project now. See below output:

In screen shot, you can see My Application text. It is your app's AppBar. Before it was ActionBar, but now there is replacement of ActionBar takes place to the ToolBar.
I'll teach you How to add ToolBar to your app.

Comments

Popular posts from this blog

SQLiteDatabase (Without SqliteOpenHelper class)

Set current date to Button and Datepicker dialog

MVC Architecture in Android