recently i wanted to run android emulator from command prompt instead of eclipse as i don't want to open eclipse just to run the apk and check the project as i am working on visual studio now below are the steps to work on emulator without IDE
Step1: First of all download latest Android SDk if you do not have it you can download android sdk from here if you already have it go to next step
Step1: First of all download latest Android SDk if you do not have it you can download android sdk from here if you already have it go to next step
after downloading android sdk extract the folder in any drive say D: or E: which has more space in my case i have more space in G: drive so i am extracting it there
step2: Make sure your system has Java Run time if not download it if you already have java installed on your system skip this step...... Now install the downloaded java run time environment and restart the system
step3: Setup the environment variables of your system so that your system can point to android SDK
right click "on mycomputer"-->select "properties"--> click on "Advanced tab" now below advanced tab window click on "Environment Variables button" now in the environment variables window make sure to add the sdk path till tools directory in my case path is G:\android-sdk-windows-1.5_r3\tools now in same window add the same path in system variables "path" as shown in below pic
step3: Setup the environment variables of your system so that your system can point to android SDK
right click "on mycomputer"-->select "properties"--> click on "Advanced tab" now below advanced tab window click on "Environment Variables button" now in the environment variables window make sure to add the sdk path till tools directory in my case path is G:\android-sdk-windows-1.5_r3\tools now in same window add the same path in system variables "path" as shown in below pic
step4: Now sdk is downloaded and environment is created its now time to create emulator image Android virtual device (AVD) else it is not possible to invoke a emulator... to create avd type below command in command prompt
G:\android-sdk-windows-1.5_r3\tools>android create avd --target 2 --name newavd
where newavd is the name of the emulator
Now it takes a few seconds to create a image of emulator and return the cursor back to command prompt once the command is successfully created you can invoke or start
step5: Now after setting environment and creating emulator image we can run android emulator from command prompt by typing below command
step5: Now after setting environment and creating emulator image we can run android emulator from command prompt by typing below command
G:\android-sdk-windows-1.5_r3\tools>emulator.exe -avd newavd
above is the steps i found out myself after doing small R&D on how to setup and start a android emulator from command prompt any still better approach will be appreciated
you might also be interested in setting up environment for android programming and to run hello world program through eclipse http://www.ceveni.com/2009/06/writing-android-hello-world-program.html you can find it in above link
you might also be interested in setting up environment for android programming and to run hello world program through eclipse http://www.ceveni.com/2009/06/writing-android-hello-world-program.html you can find it in above link
12 comments:
Hi Manjunath,
I appreciate your R&D. I would lyk to now the updated steps for android 2.1 nd can we unlock the emulator from cmd line. If so let me know.
email @ kkitsrkr@gmail.com
So far its one of the best tutorial for android emolators.. Really helped me and saved my lot of time and energy.
Thanks a lot.
Thanks good for teach
I have a problem with Android Emulator. I have created avd and run it. But when it was started I can't work, because it emulate typing many "=" symbol. I launch this avd with -debug-all parameter and debuger write "could not handle (sym=61, mod=0, str=EQUAL) >> KEY [0x00d, down]". OS - Windows 7 and XP. Last version Java platform, SDK, Eclipse.
This is really awesome...I was trying to run emulator since last two hours...But, I couldn't found any way...Really thanks a lot....
Really helpful.....Could you please also help to load apk file using cmd after the above steps
That was helpfl
Thanks ... it a very good tutorial... very simple and clear...a saviour for me.. has helped me run my emulator... thumbs up
thanks.........
thanks...very helpful for me
Post a Comment