Header Ads

Android Studio: Installation & Project Creation


The new IDE is in town since 2013. There has been a lot of buzz around Android Studio since its release and release by release the IDE is improving and maturing.
The IDE is still in BETA mode though, but, once you have started using it, you'll most likely to never look back to Eclipse IDE for sure. The IDE is specific to Android development so, it has mature features for the development e.g. automated error detections & suggestions, intelliJ for tooltip helps and many more.....But, the most anticipated feature of this development studio is Drag & Drop UI/UX development feature which haven't seen previously especially with eclipse (unless you have good UI/UX plugin of-course).

Today, I shall be demonstrating you about the installation of this new IDE along with project creation. The installation is simple and many tutorials have already been set out for it. But, I will be addressing some of the installation issues as well.

Prerequisites: 

1) Knowledge about Java programming.  
2) Knowledge about Android Application Development.  
3) Install Java Development Kit (JDK).
4) Set up JAVA_HOME.  
5) Install Android SDK.

Now, lets begin.

1) You need to download Android Studio latest version.
2) Then you need to install the Android Studio from its installer and launch the IDE.  
3) You will see following screen when your IDE is launched:


This is the start screen of Android Studio IDE, you can either choose new project or import existing one from eclipse.

4) Before you begin new project or import existing project you need to do some configurations in the IDE e.g. Android SDK setting, Gradle build setting, HTTP proxy settings etc. Click Configure button.


5) Now, click SDK Manager button to setup Android SDK path into your IDE.


6) We also need to configure few options for IDE to properly work. Click "Setting" button.


7) Now, from settings window, select "HTTP proxy" option from the left pane and select "No proxy" option from the right pane as shown in the below snippet and click OK.


This will make sure that your internet connectivity will properly work with IDE if you do not have any proxy settings.

 8) In the same "Settings" window we need to configure our Gradle build for building projects offline. By default the project compilation is being built online using Gradle build tool. But, in order to work it offline we need to configure our IDE for offline mode. Select "Gradle" option from the left pane and then check the "Offline work" checkbox in the right pane. You can also change the offline location for Gradle build as well if you want through "Service directory path" option and then click OK button. See the snippet below.


9) Now, go to back screen & click "New Project". As you create new project your Gradle build will start downloading. You need to be patient as downloading of Gradle build takes some time. Once Gradle build download is completed you will be able to see following screen:


Now, change your application name, company domain and your project local path and click next.
10) Now, you will see following screen and click next.


you can choose your minimum SDK target here and also choose whether you want to develop apps for Android TV or wearable etc.

11) In next screen, you will have the list of predefined templates you can choose from to start developing android application or you can choose blank activity template as shown below, click next:


12) In next screen, change your activity respective names and click finish as shown below:


13) Now, the IDE for the application development will open, but, Gradle build is still downloading. You can see a spinner on the bottom of the IDE. If you double click it, it will pop out. Let the download be completed as other wise we will not be able to build or compile our project. See the snippet below:


14) When the Gradle build download is completed you will see your project as follow:


15) Although, Gradle build downloading has been completed, but, we are still require to set "Offline work" once again. So, click on "File" menu and then click "Settings" as shown below"


16) In settings windows, select "Gradle" on the left pane and check the "Offline work" checkbox on the right pane as shown below:


17) Now, create Android Virtual Device (AVD) emulator if not already created and then Build & Execute the project. Since, Gradle build is available offline, so if you are not connected to internet, you will still be able to build and execute your project, but, in timely fashion you are require to use internet to sync online Gradle build for new changes which IDE will automatically prompt.

Thats about it!!

Enjoy coding!!!

1 comment:

  1. I read your full blog and noticed three thing which is important from readers point of view like when we write a blog. This article is very necessary and timely. Very good article. Thank you for telling me about this article. I know of a school & fashion house that has a good education in fashion. Fashion design schools in accra ghana Riohs Originate is a Creative Art Service and Training Institute in Ghana. https://riohs.com
    They provide services and training for individuals/organizations that value their image, style, color and insist on promptness, accuracy and consistency.

    ReplyDelete