Create and run app on virtual device in Android Studio

Besides physical devices, you can use Android Virtual Device (AVD) to debug and run your application. In this Android tip, I am going to show you how to create and run your application on a virtual device in Android Studio. You can create a virtual device to target different categories of devices (e.g. Phone, Tablet, TV, and Wear). Each category, there are a lot hardware models to meet your real target devices. Each hardware model has name, size, resolution, and density.



virtual device avd hardware model

To create a virtual device in Android Studio, you select Tools->Android->AVD Manager. You will see a window dialog that allows you to create a new virtual device. Just follow the instruction. After finishing the task, you can test whether the virtual device works by the green right-arrow under the Actions in Your Virtual Devices window dialog.


virtual device test

To run your application using the virtual device, from the Run menu, you select Edit Configurations… Then select Emulator and choose the virtual device you have created from the Prefer Android Virtual Device dropdown list. Select OK. Then press shift+f10 to run your application.
For the first run, it might take long than two minutes. To speed up the next run, do not close the virtual device.




virtual device run app

Posted by: Dara | post date: 03-24-2015 | Subject: Android Apps Development

write programming tip




This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.