ANDROID DEVELOPMENT ENVIRONMENT SETUP GUIDE ......Android Environment Setup Guide Edureka.in Page 4...
Transcript of ANDROID DEVELOPMENT ENVIRONMENT SETUP GUIDE ......Android Environment Setup Guide Edureka.in Page 4...
Android Environment Setup Guide
Edureka.in Page 1
ANDROID DEVELOPMENT
ENVIRONMENT SETUP GUIDE
Android Environment Setup Guide
Edureka.in Page 2
Table Of Contents:
Know your System Requirements: .................................................................... 3 Prerequisites: ...................................................................................................... 7
Installing Eclipse IDE: ........................................................................................ 8 Installing JDK: ................................................................................................... 10
Installing Android SDK: .................................................................................... 15 Configuring the ADT plugins: .......................................................................... 18 Trouble Shooting: ............................................................................................. 24
Android Environment Setup Guide
Edureka.in Page 3
Know your System Requirements:
If you are using Windows 7 OS follow the steps below to know the system requirements.
from the start menu Go to Control Panel Go to System and Security Section.
Go to the System Section.
Android Environment Setup Guide
Edureka.in Page 4
Here you will find the System settings as below:
From the above window you can find out whether your machine is 64 bit or 32 bit
machine.
On a Windows XP OS follow the following steps:
from the start menu Go to Control Panel Go to System.
Android Environment Setup Guide
Edureka.in Page 5
Android Environment Setup Guide
Edureka.in Page 6
Here you will find the System settings as below:
As you can see the above Machine is a 32 bit machine as it is showing Microsoft
Windows XP Professional.
For a 64 bit machine it will show Microsoft Windows XP Professional X64 Edition.
All the software’s viz. Eclipse,Android SDK,JDK will be
downloaded for the type of machine found(viz 32 bit or 64 bit).
Android Environment Setup Guide
Edureka.in Page 7
Prerequisites:
Eclipse IDE(Helios or Above).
Java Development Kit(JDK and JRE).
Android SDK.
Configuring the ADT Plugins in Eclipse.
Android Environment Setup Guide
Edureka.in Page 8
Installing Eclipse IDE:
I chose to use the Eclipse IDE for Java Developers (Helios). You can download it here :
Download "Eclipse IDE for Java Developers (92 MB)" from
here http://www.eclipse.org/downloads/
Just check whether the machine is 64 bit or 32 bit,depending upon the
machine,download the version that meets the machine requirements.
This is a zip file and does not require installation. Just copy the eclipse folder into
your programs directory.
Unzip this file.
Android Environment Setup Guide
Edureka.in Page 9
After unzip what you will find in the unzipped folder is something like this:
Android Environment Setup Guide
Edureka.in Page 10
Installing JDK: Go to the URL:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Then click on Download under the JDK section.
Choose the appropriate option that is as per the machine you are installing the
JDK viz. 32 bit machine or 64 bit machine.
Android Environment Setup Guide
Edureka.in Page 11
Android Environment Setup Guide
Edureka.in Page 12
Once the download is over. Go to the .exe file ,double click on this.
Now click on Next.
Android Environment Setup Guide
Edureka.in Page 13
Now click on Next.
Once done with the Installation of JAVA.
Android Environment Setup Guide
Edureka.in Page 14
We need to set the Environment variables in order to use JDK with Eclipse.
Go to My Computer from the startup menu, right click it Go to PropertiesGo
to Advanced System SettingsFrom the Popup openedGo to Environment
Variables.
Click on New.
Name the Environment Variable as path.
Place the value of the JDK installation folder on your machine till the folder’s bin
directory. For ex: C:\Program Files\Java\jdk1.7.0_05\bin
Create another environment variable name it as JAVA_HOME and set the values
as
C:\Program Files\Java\jdk1.7.0_05 i.e. excluding the bin directory.
Once we have created the Environment variables, we are done with the process of JDK
installation.
Android Environment Setup Guide
Edureka.in Page 15
Installing Android SDK:
Download the install package after clicking download button from
here http://developer.android.com/sdk/index.html
This will download an .exe file,double tap on it and click on Run.
In the process it will take the Java location by itself,If not there is some problem
in the Java installation and some troubleshooting needs to be done.
The Installer will guide you through the steps and install the android SDK on the
folder location specified by the User. You can install the package anywhere but
remember where you put as you will need to reference it in Eclipse. I happen to
install it inside my eclipse folder.
Launch "SDK-Setup.exe" located in the Android SDK install folder"
Check "Updates/New",”Installed”,”Obsolette” in the bottom pane.Please
check all the choices at the bottom bar.
Android Environment Setup Guide
Edureka.in Page 16
And then select any/all platforms you want to develop by checking on the
radio button. You can select all (be prepared for a long download) or you can
select only the platfrom for you phone. Foe eg.Android 2.2 etc.
By default API level 15 will be selected,this is the latest version launched by
Android.
Press "Install Packages" button at the bottom.
Android Environment Setup Guide
Edureka.in Page 17
Then press “Install” button again.
When done loading the packages close the window.
Android Environment Setup Guide
Edureka.in Page 18
Configuring the ADT plugins:
Launch Eclipse for the first time. You will be asked where you want your
workspace folder to be located.
o I used the default workspace.
o Press "OK".
Select "Help > Install New Software..."
Press "Add..."
Android Environment Setup Guide
Edureka.in Page 19
Fill out the Add Site information
o Name: Android
o Location: https://dl-ssl.google.com/android/eclipse/
o Press "OK"
If you get an error don't use SSL. change location from "https://dl-
ssl.google.com/android/eclipse/" to "http://dl-ssl.google.com/android/eclipse/"
After a connection is made and available tools are retrieved expand
"Developer Tools" and NDK Plugins.Check both and check on both the
boxes.
Android Environment Setup Guide
Edureka.in Page 20
Press Next.
Press next again.
Android Environment Setup Guide
Edureka.in Page 21
Click on I accept the terms of licence agreement.
You might receive a warning which says:
Android Environment Setup Guide
Edureka.in Page 22
Click on OK.
Click Finish.
Done. Now you should restart Eclipse as per the message displayed.
After rebooting we need to tell Eclipse where we copied the "Android SDK" in
step 3.
On Reboot the Eclipse will prompt you for the Location of the Android SDK on the
Machine.
Click on use existing SDK’s and browse through the file structure to locate the
SDK.
Click on the SDK directory from the file browser window.
Click Next.
Click on Finish.
Android Environment Setup Guide
Edureka.in Page 23
Another alternate is that you close the popup window and provide the SDK
loation by performing the following steps:
Select "Windows > Preferences"
Select "Android" from the left pane. After you select "Android" you will receive
an error. That is because it is not setup yet. We are setting it up now.
For the SDK Location, browse to where you installed the SDK.
Press "OK"
Android Environment Setup Guide
Edureka.in Page 24
A dialog box will appear. If you want to send usage data to Google leave it
checked, other uncheck it and press "Continue". This dialog box can sometimes
get trapped beneath your window. Minimize Eclipse if you don't see it.
Trouble Shooting: If after the installation of JDK and Android SDK,you find an error like below:
You have made the wrong software installation i.e the Eclipse IDE and the JDK are incompatible. An Example can be that the JDK was downloaded for 64 bit machine and Eclipse for a 32 bit machine or Vice versa or both could not be downloaded for the targeted machine. In order to resolve this do an Uninstall of JDK from Add/Remove Programs and download a new Eclipse and JDK for the Target Machine(64 bit or 32 bit) and follow the steps as mentioned from the beginning of the document.