[Android development] 2. Creating and running Emulators for testing apps

 android dev 2

Welcome back guys,
In this tutorial lets learn about Emulators/Virtual Devices

Emulator is a software that can run a virtual device or software that is actually designed to work in other Operating system. Learn more about Emulator in Wikipedia - Click Here.

In our case, we need to test and run android applications in the emulator, so we need an Android Emulator in the windows operating system. Lets get started,

Follow the Steps for creating Android Virtual device (AVD) :-
open avd manager
  1. Open Android studio Home screen.
  2. Click on 'Start a new Android Project' option. ( Since you cant access AVD Manager settings directly through the Android studio home screen ).
  3. Keep on clicking 'Next', don't change any names in any windows(Time waste). at last click on 'Finish'.
  4. Your temporary project will get loaded in some time, wait until then. 
  5. After your project files are loaded ( in this case , a 'Hello World' code which comes by default in the Android studio when you create a new project ), Go to 'AVD Manager' which can be found at the top toolbar of the Android studio. (See the screenshot below).
  6. It will launch the AVD Manager.
  7. Then Click on 'Create Virtual Device' option. (See the screenshot below)
    create avd
     
  8. Fill in the details of your new Virtual device (such as name, screen size, screen density, RAM Value etc)
  9. Change the RAM Value to 1GB(Minimum), for good performance of the emulator.
  10. Click on 'Save'.
  11. It will save the Device in some time.
  12. Launch the Emulator by clicking the play button in the actions column of the device list.
  13. It will take some time to launch the AVD, since it is the first run (like any new android smartphone would take)
  14. After the emulator has started, the next thing to do is test your Default Hello world application in it.
  15. Go to Android Studio and click on 'Run App' button which can be found at the top toolbar of the Android Studio.
  16. Android studio will check for errors in the code(if any), and if there are no errors, it will launch the app in the emulator successfully. 
  17. you can deal with the virtual device like any other android smartphone.  
 Look at the Video Tutorial of this post in YouTube




 That's it. You are ready with your Emulator. In the next tutorial We will learn to create a 'Hello World' Application in Android studio.
Keep visiting...

He is a simple passionate tech freak who himself is an engineering student at Canara Engineering college. He likes App Development, Web designing, Blogging, Youtubing, Debugging and also is a CodeGeek!

Sharing is sexy!

Related Articles

Share your views about this article!