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:
- Install Java,
- Android SDK, and
- 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.
3. Androd Studio
Create a directory for workspace in Documents
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
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.
- Getting the SDKs for development, and
- 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.