Create Android Application Project in Android Studio

In previous blog, we tried to reason with developers who are still using Eclipse to migrate to Android Studio. Well, here in this post we are going to explain the process of creating project in Android Studio. Even if you are a beginner or you were previously using Eclipse and now wants to switch to Android Studio, this post is for you.To begin Android Application Development using Android Studio, you need three things:

  1. Install Java,
  2. Android SDK, and
  3. Android Studio

It is better to keep Android SDK, Android Studio and workspace in one place. It’s easy to explore. So, for this purpose, create a directory android_dev in Documents.

1. Install Java.

Installing Java on Windows OS is easy. Download it from Oracle’s website and run the installer.

To install Java on Linux please follow our blog post How to Install Java – Ubuntu.

2. Android SDK.

Download Android SDK from Android Developers website. Extract the same in the directory.

~/Documents/android_dev/sdk

3. Androd Studio

Download Android Studio from Android Tools Project Site (at the time of writing latest beta release is 0.8.9. Extract the archive in same directory

~/Documents/android_dev/android_studio

Create a directory for workspace in Documents

~/Documents/android_dev/workspace_as

Now, you have a directory structure like this

<home-directory>
|-Documents
  |-android_dev
    |-android_studio
    |-sdk
    |-workspace_as

If everything is gone right then you are ready for Android Application Development.

To start Android Studio open studio.sh

~/Documents/android_dev/android_studio/bin/studio.sh

NOTE: If you double click this sh file then it will open in GEdit. To overcome this issue, select studio.sh open preferences from menu.

Edit > Preferences

Navigate to second tab Behaviour and select Ask each time from it. Click OK and exit.
Now, if you double click the studio.sh file you will be provided with a dialog. Select Run to execute the studio.sh.
This will open Android Studio. It will ask for the path of Android SDK. Provide the path by browsing to it.
At this point of time, if you are not getting any error, it means you did well. Congratulations, all is set now only two things are remaining.

  1. Getting the SDKs for development, and
  2. Developing application.

To download SDKs, select Configure>SDK Manager. Then, download all which suits your requirements. We will propose to download API 24 and above. (Target the latest version of Android).
In next blog post we will create a project in Android Studio.