Nikos Maravitsas

About Nikos Maravitsas

Nikos has graduated from the Department of Informatics and Telecommunications of The National and Kapodistrian University of Athens. Currently, his main interests are system’s security, parallel systems, artificial intelligence, operating systems, system programming, telecommunications, web applications, human – machine interaction and mobile development.

Android Studio Tutorial: Getting started with the new Android IDE

In May 15th, during Google’s I/O developer conference, a new developer suite called Android Studio was announced. It is a very powerful IDE based on the famous IntelliJ IDE. Android Studio offers a lot more options for Android Developers on top of InteliJ’s fantastic features and deep code analysis. And it seems that it is aimed to the Android Professionals that want to make the process much faster and be more productive in general.

In this example we are going to see how to install Android Studio, as well as creating and Launching a new Android Project with it.

1. Download and Install Android Studio

Android Studio comes with everything you need in order to start developing Android Applications instantly. If you already have Android SDK Manager and Android Virtual Devices (AVD) already installed, that’s fine; it will work with those, no problem whatsoever.

Go to the home page of Android project to download the Bundle for your platform:

http://developer.android.com/sdk/installing/studio.html

donwload-android-studio

The Installer will install Android Studio 0.1.1, and you can update it later from inside the application.

When the download is finished, launch the installer:

install1

And specify the installation folder:

install-location

When the installation is finished check the option to Start Android Studio and click Finish:

start-android-studio

2. Create a new Android Project

When Android Studio launches it will prompt you if you want to import settings from a previous installations ( I guess that this would apply for previous installation of IntelliJ with or without the Android Bundle …).

import-preferences

After that step, you will find yourself in Android Studio Quick Start Window. You can specify many settings and configuration options from there, but let’s go ahead and select “New Project”:

quick-start

Then you have to specify the Project Name, the main Package Name, as well as the target platforms and also the Theme of the application. You can also choose to create a new Activity and select a custom Launcher Icon:

create-new-project

Then you can select and customize your Launcher Icon:

select-launcher

Now you can create a new blank Activity for your project.

create-blanc-activity

You have to specify a Name for the activity and the corresponding Layout XML file Name.

create-blanc-activity-attr

All the above should seem familiar, if you’re using Eclipse IDE for Android Development.

4. Run the Application

After clicking finish you will find yourself in the IDE. This is how it looks like:

android-studio

Now you can select Help -> Check For Updates to update Android Studio to the latest available version.

You can go ahead and click the Run Button to run your application. You will be prompt to choose the device you want to install your Application to. I have already installed AVDs in my system so I can work with those. This should come really handy when you have multiple real devices connected to your system and you want to install and run the applications on them as well:

choose-device-to-run

5. Live layout Editing

One of the most impressive characteristics (at first glance …)of this IDE is the new live layout editing where you can preview your user interface in  a number of real devices , both smartphones and tablets, on the fly as you are editing the code. You can also choose to preview your code in different orientations. It looks and works great:

layout

6. Video

This is a video with a small preview of Android Studio’s numerous features:

7. Download the Android Studio Project

Download the Android Studio Project of this tutorial: HelloAndroidStudioProject.zip

8. Conclusion

This was just an introduction to Android Studio that will get you up and running with Android Studio. I’m sure that there are tons of features to explore. Hope you are excited with Android Studio!

Related Whitepaper:

Transforming a Generic Java IDE to Your Application Specific IDE

Improve software development by passing along shared knowledge and best practices.

One of the biggest challenges in application development today is how to factor in application-specific information. The answer lies in the ability to capture application evolution and developers' knowledge of building and extending the application as metadata so that it's not lost in time or translation. Once that can be done effectively, the combination of the application code along with application-specific metadata can be meaningfully packaged into reusable software asset modules. This white paper will discuss how 'Application Factories' can transform an IDE to play a central role in capturing both the application evolution and the developers' knowledge.

Get it Now!  

4 Responses to "Android Studio Tutorial: Getting started with the new Android IDE"

  1. Jeffrey says:

    Great! thanks it helped me alot

  2. Joe McDaniel says:

    I tried moving your sample project into the project directory and opening it. I could not build because of the following error: org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle distribution ‘http://services.gradle.org/distributions/gradle-1.6-bin.zip’.: Could not execute build using Gradle distribution ‘http://services.gradle.org/distributions/gradle-1.6-bin.zip’.

    This was with the latest version of the IDE.

  3. Habutre says:

    Same here, the latest version 0.32 or 0.34 I got the same behavior

  4. ash says:

    Hi every one..!

    for my project i have to develop an android app for this i have to learn the basics of android studio ..for this i have downloaded the android studio from this link https://developer.android.com/sdk/installing/studio.html and also downloaded and installed the JDK .. i have started building my new project and i was facing problem in creating new virtual machine ..in target i wont be able to get the option for android 4.4.2 API level 19 and in CPU/ABI i dont get the option of ARM armeabi-v7a… i thought this problem is due to sdk which i havn’t installed .. so to overcome this problem i have downloaded the SDK from this link https://developer.android.com/sdk/index.html.. now i dont know how to install it and how to step forward in my new project of building a simple android app…plz help me out in this …

Leave a Reply


2 + five =



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Do you want to know how to develop your skillset and become a ...
Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

Get ready to Rock!
You can download the complementary eBooks using the links below:
Close