Getting Started with Android Development: Installing Android Studio and Creating Your First basic Project
Android Technology is becoming increasingly popular day by day, even after 7 years of its release. Ever since its release in 2008, Android OS users are increasing in an explosive rate, thanks to its Open source Technology and its millions of apps available from Play Store making life easier for many users. Learning Android Development always benefits developers as it is the most popular mobile platform and by developing an app, it helps to reach lots of users who are already using this Technology.
Following the release of Android Lollipop 5.0 at the end of November this year, Google released its new Android studio stable version 1.0 this week on 9th December, 2014, also dropping its support for further development of Eclipse ADT after this stable release. While most of the available android blogs are targeted on eclipse till date and most of them can be confusing for beginners who just started with Android Studio, I would like to begin this blog starting with Android development using Android Studio mostly.
In this first post you are going to learn How to install Android Studio, How to Create your First Project as well as Running it.
Getting Started With Android Studio:
1. Downloading and Installing Android Studio:
Previously the installation of Eclipse used to be a hassle where you have to set up eclipse software and Install ADT plugin. Now with Android Studio, you can install just like any other software.
You can check system requirements, download the software at Android Developer Website .
a. Download the Android Studio and Start setting up Android Studio which is very basic and straight forward.
b. It is recommended to select all the three components listed below
Android Virtual Device Installation helps you run the projects virtually using emulator without any android device, while Performance (Intel HAXM) helps running the emulator fast.
c. Leave the rest as default and install the software.
d. Let the setup wizard download the required files which will take some time depending on your internet speed. Make sure that all the files are installed correctly so that no error occurs.
Creating Your First Android Project with Android Studio:
1. Open Android Studio by clicking on Android Studio icon. You will now see the welcome dialog as follows if you have installed it correctly:
2. Now select “Start a new Android Studio project” from Quick Start. This will open a new project window as follows:
3. Application name is the name of the project you want to develop and Company domain is the domain name similar to the one like coderefer.com. However it is NOT compulsory that you need to have your own domain. You can write any name with a dot in middle (Eg: vamsi.tallapudi). You can see that the package name start changing accordingly while you are changing Application name and Company Domain. The package name is very important while uploading your app to play store as it should not coincide with any other app’s package name from play store. So carefully choose the company domain name such that it is unique.Now hit Next button at the bottom.
4. Now a new Form factor window appears where you have to choose the minimum SDK version for your app to support. All the devices which are below the minimum SDK version will not be able to run your app. So choose the minimum SDK carefully. While gingerbread still holds a 9 percent share as of today, it is recommended to choose API 9 as minimum SDK version. Disadvantage of using low APIs is that you cannot use some of the latest features while developing apps. So we choose API according to the requirements of the app. You may also choose the minimum SDK for tv, Android Wear, Google Glass for your app to support those device
Now click Next.
6. Leave ‘ Choose options for your new file’ window as it is and hit Finish.
Now your first android basic app is created. You can use Run button shown in figure below to run your app.
There are two ways to run this app as shown in figure below:
One way is to launch the app in Emulator. The other way is to use your own android device and install the app to it. You can choose any of them to run your app. It is preferred to use your own device for fast and smooth running. However android studio is rendering the app faster compared to eclipse, so you can choose any option. Another advantage of using emulator is to to test your app with many API versions by simply creating Android Virtual Devices (AVD) accordingly. In the next article, we are going to discuss about How To Test Android App on a Real Device and also about Testing Android App on Emulator in Detail.