Click here to Skip to main content
15,867,141 members
Articles / Mobile Apps / Android

Setting Up Your Android Development Environment - Step By Step Learning

Rate me:
Please Sign up or sign in to vote.
4.63/5 (7 votes)
15 Aug 2014CPOL6 min read 21.4K   25  
A step by step guide to setting up your Android Development Environment

Introduction

Let’s start learning the procedures to install and configure Android development environment.

Objectives

  • Android Developer Tools
  • Installing Eclipse IDE
  • Installing the Android SDK
  • Adding SDK Packages
  • Android Studio ‘Beta’
  • Android NDK
  • Next Step

Android Developer Tools

Android development is supported by the three major desktop/laptop operating systems Windows, Mac OS X and Linux GNOME/KDE.

The following are the Google recommended development software and tools for Android development.

  • Eclipse IDE + ADT (Android Development Tools) plugin
  • Android SDK Tools
  • Android Platform-tools
  • A version of the Android platform
  • A version of the Android system image for the emulator

Other than the above listed options, Android development can be done using several other ways:

Android Studio – This is a new IDE for Android development, built based on IntelliJ IDEA. It provides different features and improvements over regular Eclipse ADT. Right now, it is available in beta version and will be the official Android IDE in the near future.

Microsoft Visual Studio – This will provide support for Android NDK based developments with the support of VS-ANDROID (https://code.google.com/p/vs-android/).

IntelliJ IDEA – Jetbrains brain provides one of the most comprehensive IDE call IntelliJ IDEA. The Ultimate Edition is licensed product, if interested in moving away from Eclipse and looking for paid product you can consider IntelliJ IDEA.

Xamarin – This is third party platform for building Android and iOS apps using C# programming language. This will be very helpful in some scenarios, example if a small company as few C# experts and if wanted to build Android apps using their expertise Xamarin can make the difference.

Still there are more Android development environment options out there to analyse, but the above listed ones are the most widely used and influenced options across the globe.

In this article, we learn to install and configure Android Development environment required software and tools.

At first, we will learn how to install and configure the Google recommended development software and tools for Android development which is based on Eclipse + ADT and others in Windows 7 laptop.

Eclipse IDE for Windows with SDK

http://developer.android.com/sdk/index.html

Image 1

http://developer.android.com/sdk/index.html#win-bundle

ADT (Android Development Tools) Plugin

The following download is only required if your system is already installed with Eclipse IDE.

http://dl.google.com/android/installer_r23.0.2-windows.exe

Image 2

Android SDK Tools and Others

If we already installed and configured the SDK and wanted to update to the latest version of the SDK Tools, we can use the Android SDK Manager to get the updates.

http://developer.android.com/tools/sdk/tools-notes.html

Installing Eclipse IDE

Unpack the ZIP file adt-bundle-windows-x86_64-20140702 (named adt-bundle-<os_platform>.zip) and save it to a location. Open the ../adt-bundle-windows-x86_64-20140702/eclipse/ directory and launch Eclipse. When you launch the Eclipse, the following will be your first screen.

Image 3

Once after assigning the workspace, you can see options to create a new project in Eclipse.

Image 4

Now, fill in the App details as you required.

Image 5

In the next wizard screen, you can add your custom icons and images for your App.

Image 6

We have options to use the built in activities or you can built a custom one as per your requirement.

Image 7

After selecting all the options, click the finish button to the final project created as follows.

Image 8

Android Studio ‘Beta’

The second considerable option for Android development environment would be Android Studio, which is still in beta. Let’s try to install the Android Studio in MacBook Pro with Mac OS 10.9.4.

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

Image 9

Once after downloading the file, open the android-studio-bundle-135.1245622-mac.dmg.

Image 10

Drag and drop Android Studio into the Applications folder.

Image 11

Depending on your security settings, when you attempt to open Android Studio, you might see a warning that says the package is damaged and should be moved to the trash.

Image 12

If this happens, go to System Preferences > Security & Privacy and under Allow applications downloaded from, select anywhere. Then open Android Studio again.

Image 13

The individual tools and other SDK packages are saved within the Android Studio application directory.

Image 14

If you need to access the tools directly, use a terminal to navigate into the application and locate the sdk/ directory.

Let’s update the available updates for the Android Studio.

Image 15

Once after the updates have been installed, the Android Studio will restart. Now, click on the New Project and test the installation works fine.

Image 16

Fill in the application name and project location and click next to proceed further.

Image 17

For now, check the Phone and Tablet option and in the minimum SDK, you can select the API version you want to build the app for. The TV and Wear is for developing apps and solution other gadgets. You can also see the Android L (Preview) under TV section which is the next version of Android.

Image 18

Here in this wizard, you have built activity screen options available for your App or you can use no activity and build your own App.

Image 19

Click finish and the solution will be created. You may see a warning in the Gradle Sync.

Image 20

Update your JDK to 7 and restart the Android Studio.

Now you may need to update the tools and APIs. Open the SDK Manager.

Image 21

After opening the SDK manager, select the necessary tools and extras and install.

Image 22

Once after the package updated, check AVD is available in the Android to run your test app.

Image 23

Once after the installation completed, when you create app you can see how the final solution will look like.

Image 24

Android NDK

The Android Native Development Kit (NDK) is a development set that lets you to instrument portions of your app using native-code languages such as C and C++. Most of the apps do not need the Android NDK, but in certain cases, this can be helpful to reuse present code libraries written using NDK supported languages.

In this section, let’s see how we can configure VS-ANDROID in Microsoft Visual Studio and leverage it as Android NDK development platform.

In our article, we will configure Android NDK, VS-ANDROID in Visual Studio 2010. First download the related version of NDK for system. Get the NDK listed under "(32-bit target)". Run setx ANDROID_NDK_ROOT c:\android-ndk-r10 in cmd prompt to set the environment variable named.

http://developer.android.com/tools/sdk/ndk/index.html

Image 25

Unzip and run setx ANDROID_NDK_ROOT c:\android-ndk-r10 in cmd prompt to set the environment variable named.

Image 26

Unzip the download vs-android-0.963.zip file to location. Under the .. \MSBuild folder, you can see the following:

Image 27

Run the corresponding install_vsxxxx file, in my case install_vs2010.

Image 28

For some of the issues, the following link will help you to solve it:

Also you consider http://visualgdb.com/tutorials/android/vs-android/ for more enhanced feature.

Next Step

Now we have all different kinds of development environment installed and configured, as we needed. Let’s start building a new App of our idea. From our next article, we will see how we can build an App with one of the above development environments.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer at Zealots
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --