How to install Android Eclipse Plugin and start coding immediately (Android Virtual Device Definition- Android SDK)


Hi, in this short tutorial, we are going to install Android Development Plugin (which is called ADT (Android Development Tools)) on Eclipse briefly.

First of all, to do that please download Eclipse from the following location;

1. http://www.eclipse.org/downloads/

2. When you start Eclipse choose

install_new_soft

Copy and paste Work With location

https://dl-ssl.google.com/android/eclipse/

and press add like this;

adt_lib_select

Click Next for downloading and accept license agreement. After the installation, you need to restart your eclipse in order to start programming Android apps.

3. You need to define the location of Android SDK Tools inside eclipse to start coding, for that reason, you need to download Software Development Kit including the main functionalities, libraries of Android, for doing that go to http://developer.android.com/sdk/index.html
under use existing IDE menu choose download the sdk tools for windows

4. After the download, click on the exe file choose a sdk installation location (we will use this location later inside eclipse)

and_sdk_loc

Click next and on SDK Manager click install all (in my case 11 packages)

Please note SDK Path will be used inside Eclipse so it is better to note somewhere for me it is under C:\Users\tunato\AppData\Local\Android\android-sdk

AND_SDK_MAN

This will take some time so be patient. Press close after all downloads are completed.

5. Before coding Android apps using Eclipse, you need to set the location of Android SDK on Eclipse for that;

Window>Preference>Android

inside SDK Location choose your sdk installation directory for me C:\Users\tunato\AppData\Local\Android\android-sdk

press apply and ok and now you are ready to code Android

android_sdk_loc_eclipse

6. For testing the android SDK installation, we will now  define a AVD which is called as Android Virtual Device and this device will use Android API

Click on Window > Android Virtual Device Manager or Android DM button on the left

AVD

Select the following values by setting AVD Name, Device, Target and CPU click ok and this will create our virtual Android Device and we will use this device for testing our apps

avdconf

To test our configuration including SDK installation and AVD definition click on

File>New>Other and choose Android Sample Project
Select HellowEffects sample android project from list;

ps

Click on Finish;

Right click on HelloEffects sample app

sampleapp

Click on Run as Android Application and this will open Android Virtual Device, (if it fails try to decrease AVD ram values by decreasing RAM values)

You have to be patient while the initialization of AVD. This will take some time for the first time,

On Android Virtual Device app menu  click on FX HelloEffects 

vd

And after clicking you will see a screen like that so the application works!!

vd2

Emulator Console log will be similar to this one;

[2013-08-30 11:12:55 – SDK Manager] Updated AVD ‘AVDTEST’ based on Android 4.3, Intel Atom (x86) processor,
[2013-08-30 11:12:55 – SDK Manager] with the following hardware config:
[2013-08-30 11:12:55 – SDK Manager] hw.sdCard=no
[2013-08-30 11:12:55 – SDK Manager] hw.device.manufacturer=Google
[2013-08-30 11:12:55 – SDK Manager] hw.mainKeys=no
[2013-08-30 11:12:55 – SDK Manager] hw.lcd.density=320
[2013-08-30 11:12:55 – SDK Manager] hw.accelerometer=yes
[2013-08-30 11:12:55 – SDK Manager] hw.dPad=no
[2013-08-30 11:12:55 – SDK Manager] hw.device.hash=298918422
[2013-08-30 11:12:55 – SDK Manager] hw.trackBall=no
[2013-08-30 11:12:55 – SDK Manager] hw.device.name=Nexus 4
[2013-08-30 11:12:55 – SDK Manager] hw.camera.back=none
[2013-08-30 11:12:55 – SDK Manager] hw.sensors.proximity=yes
[2013-08-30 11:12:55 – SDK Manager] hw.battery=yes
[2013-08-30 11:12:55 – SDK Manager] disk.dataPartition.size=200M
[2013-08-30 11:12:55 – SDK Manager] hw.gpu.enabled=yes
[2013-08-30 11:12:55 – SDK Manager] hw.audioInput=yes
[2013-08-30 11:12:55 – SDK Manager] hw.sensors.orientation=yes
[2013-08-30 11:12:55 – SDK Manager] hw.camera.front=none
[2013-08-30 11:12:55 – SDK Manager] hw.gps=yes
[2013-08-30 11:12:55 – SDK Manager] skin.dynamic=yes
[2013-08-30 11:12:55 – SDK Manager] hw.keyboard=yes
[2013-08-30 11:12:55 – SDK Manager] vm.heapSize=64
[2013-08-30 11:12:55 – SDK Manager] hw.ramSize=768
[2013-08-30 11:13:49 – HelloEffects] ——————————
[2013-08-30 11:13:49 – HelloEffects] Android Launch!
[2013-08-30 11:13:49 – HelloEffects] adb is running normally.
[2013-08-30 11:13:49 – HelloEffects] Performing com.example.android.mediafx.HelloEffects activity launch
[2013-08-30 11:13:49 – HelloEffects] Automatic Target Mode: launching new emulator with compatible AVD ‘AVDTEST’
[2013-08-30 11:13:49 – HelloEffects] Launching a new emulator with Virtual Device ‘AVDTEST’
[2013-08-30 11:13:51 – Emulator] emulator: Failed to open the HAX device!
[2013-08-30 11:13:51 – Emulator] HAX is not working and emulator runs in emulation mode
[2013-08-30 11:13:51 – Emulator]
[2013-08-30 11:13:51 – Emulator] emulator: Open HAX device failed
[2013-08-30 11:13:51 – Emulator]
[2013-08-30 11:13:51 – Emulator] emulator: warning: opening audio input failed
[2013-08-30 11:13:51 – Emulator]
[2013-08-30 11:13:51 – Emulator] creating window 0 0 513 854
[2013-08-30 11:13:51 – HelloEffects] New emulator found: emulator-5554
[2013-08-30 11:13:51 – HelloEffects] Waiting for HOME (‘android.process.acore’) to be launched…
[2013-08-30 11:14:41 – HelloEffects] HOME is up on device ’emulator-5554′
[2013-08-30 11:14:41 – HelloEffects] Uploading HelloEffects.apk onto device ’emulator-5554′
[2013-08-30 11:14:42 – HelloEffects] Installing HelloEffects.apk…
[2013-08-30 11:15:13 – HelloEffects] Success!
[2013-08-30 11:15:13 – HelloEffects] Starting activity com.example.android.mediafx.HelloEffects on device emulator-5554
[2013-08-30 11:19:04 – Emulator] Error accepting connection, aborting

So you can continue from now to develop your custom apps with this configuration!!

T.T

Advertisements

One thought on “How to install Android Eclipse Plugin and start coding immediately (Android Virtual Device Definition- Android SDK)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s