The next step is to create an Android Virtual Device (AVD) you can use for testing your Android application. An AVD is an emulator instance that enables you to model an actual device. Each AVD consists of a hardware profile ; a mapping to a system image ; and emulated storage,such as a secure digital (SD) card.One important thing to remember about emulators is that they are not perfect. There are some applications , such as games (which are GPU heavy ) or application that use sensors such as the GPS or accelerometer. Theses types of application cannot be simulated with the same speed or consistency within an emulator as they can when running on an actual device. However , the emulator is good for doing some generalized testing of your applications.
You can create as many AVDs as you want to test your applications with different configurations. This testing is important to confirm the behavior of you application when it is run on different devices with varying capabilities.
Use the following steps to create AVD. This example demonstrates creating AVD (put simply,an Android emulator) that emulates an Android device running Android N on the Nexus 5x hardware specs.
1. Start Android Studio so that the welcome screen is visible.Click Start a New Android Project. You see the Create New Project Wizard.
2. Set up a HelloWorld project. Type Helloworld in the Application Name field.
3. You can keep the default values for the fields on the New Project screen.Click next.
NOTE :- For the purposes of setting up a quick Hello World project and creating an AVD , you will be accepting many of the default values,without explanation, during the project setup process. This is fine for now,as all of the setting are explained in much greater detail in subsequent Blog.
4. You should see the Targeted Android Devices screen. By default , the Create New Project Wizard selects for you the Android SDK level that has greatest activity based on statistics gathered from Google Play. At the time this blog was written 74.3 percent of the active devices on Google Play were written using Android Jelly Bean. For now,accept the default show , and click Next.
5. On the Add an Activity to Moblie screen , accept the default choice - Empty Activity and click Next.
6. Accept all of the defaults on the Customize the Activity screen, as show , and click Finish. show the open Android Studio IDE.
7. Launch the AVD Manager by selecting tool -> Android-> AVD Manager or using the AVD Manager button from the toolbar. As shows the Android Virtual Device Manager Wizard , which is where you set up AVDs to be used when you emulate your application in Android on your desktop.
8. Click the + Create Virtual Device button to create a new AVD. the Virtual Device Configuration screen opens as show.
9. Select the Nexus 5x hardware profile and click Next. Although none of the emulators offers the same performance as its actual hardware counterpart , the Nexus 5x should run well on most x86-based desktops, and it still offers some of the mid -to high-end Android Device specs.
10. For the system image , select and install the latest the latest option, which at the time this blog was written is Android Nougat . Click the x86 Images tab , select N from the list of images , and then click Next.
11. In the Android Virtual Device (AVD ) dialog , accept the defaults as show figure Click the Finish button to begin building the AVD.
TIP :- it is preferable to create a few AVDs with different API levels and hardware configurations so that your application can be tested different version of the Android OS.
You can create as many AVDs as you want to test your applications with different configurations. This testing is important to confirm the behavior of you application when it is run on different devices with varying capabilities.
Use the following steps to create AVD. This example demonstrates creating AVD (put simply,an Android emulator) that emulates an Android device running Android N on the Nexus 5x hardware specs.
1. Start Android Studio so that the welcome screen is visible.Click Start a New Android Project. You see the Create New Project Wizard.
2. Set up a HelloWorld project. Type Helloworld in the Application Name field.
3. You can keep the default values for the fields on the New Project screen.Click next.
NOTE :- For the purposes of setting up a quick Hello World project and creating an AVD , you will be accepting many of the default values,without explanation, during the project setup process. This is fine for now,as all of the setting are explained in much greater detail in subsequent Blog.
4. You should see the Targeted Android Devices screen. By default , the Create New Project Wizard selects for you the Android SDK level that has greatest activity based on statistics gathered from Google Play. At the time this blog was written 74.3 percent of the active devices on Google Play were written using Android Jelly Bean. For now,accept the default show , and click Next.
5. On the Add an Activity to Moblie screen , accept the default choice - Empty Activity and click Next.
6. Accept all of the defaults on the Customize the Activity screen, as show , and click Finish. show the open Android Studio IDE.
7. Launch the AVD Manager by selecting tool -> Android-> AVD Manager or using the AVD Manager button from the toolbar. As shows the Android Virtual Device Manager Wizard , which is where you set up AVDs to be used when you emulate your application in Android on your desktop.
8. Click the + Create Virtual Device button to create a new AVD. the Virtual Device Configuration screen opens as show.
9. Select the Nexus 5x hardware profile and click Next. Although none of the emulators offers the same performance as its actual hardware counterpart , the Nexus 5x should run well on most x86-based desktops, and it still offers some of the mid -to high-end Android Device specs.
10. For the system image , select and install the latest the latest option, which at the time this blog was written is Android Nougat . Click the x86 Images tab , select N from the list of images , and then click Next.
11. In the Android Virtual Device (AVD ) dialog , accept the defaults as show figure Click the Finish button to begin building the AVD.
TIP :- it is preferable to create a few AVDs with different API levels and hardware configurations so that your application can be tested different version of the Android OS.
Comments
Post a Comment