Android Studio Tutorial for Beginners – Getting Started
Android studio is based on Intellij Idea which is a java IDE. It is an official IDE for developing android applications. In this android studio tutorial you will learn everything you need to start developing android applications from scratch. You will also learn to build a sample application in android studio IDE.
Getting Started with Android Studio
Download android studio from official android developer‘s site. Install the exe file which contains SDK (software development kit) and tools for developing android applications. Open up android studio and create a new project.
Configure your new android studio project
Step #1. Type in the android application name, package name (click Edit) and project location where your android studio project would be stored. Next you need to choose the API for your project.
Step #2. Next you need to choose a theme which will add an activity to your android application in android studio. You can choose to have no activity, blank activity, google maps activity, Navigation Drawer activity and many more. Let’s choose blank activity and proceed.
Step #3. Next you can specify name of your activity, layout name, title and name of menu resource. Click finish to get started.
Project View in android Studio
When you create a new project in android studio you will be presented with the following screen. Folder structure is marked in green oval and path in red. Project view is present on the left hand side of the screen and can be enable or disable by using (Alt+1) shortcut in windows and (cmd+1) in mac.
All the important files with which we will be interacting are stored inside main folder (refer green oval in above screenshot).
Some FAQ on Android studio
#1. Where are java files located?
ProjectName -> app -> src -> main -> java -> package
#2. Where are android’s assets or layout files?
ProjectName -> app -> src -> main -> res
#3. Gradle Build System in Android Studio.
You need to convert your android project source code into an apk file. Build system (Ant in our case) helps to package android application in an apk file. This APK file gets executed by android operating system. Ant is used in eclipse and Gradle in Android studio. Gradle has replaced the ANT system.
#4. How to create an AVD (android virtual device)?
- Go to Tools >> Android >> AVD Manager.
- Then click on Create Virtual Device.
- Click on New Hardware Profile.
- Now enter the name, screen size, RAM and Resolution according to your hardware configuration. Below you can find a screenshot.
- Click OK to create a new device configuration. Now you can see your device in the list. Select the device and click next button to select the system image. I am choosing lollypop. Click next button to review the AVD configuration.
- Hit finish to start AVD in android studio. Alternatively you can start AVD by going to Tools >> Android >> AVD Manager.
Run a new application in Android Studio
We will be adding more content to this tutorial soon.