The Android mobile operating system is an open-source system launched by Google. However, when we just launched the Android Application, some error messages are usually displayed on the console. The reason is that the Android virtual device is missing. So how can we create AVD correctly?
- Android full screen
- Basic concepts of Android floating point
- Android Performance Comparison of advantages and disadvantages in actual development
- In-depth analysis of Android code structure
- Concepts related to Android screen elements
When you run the Android Application for the first time, the above message is displayed on the console. The cause of the failure is the lack of AVD (Android Virtual Device ).
To create an Android virtual device, follow these steps:
To avoid exceeding the scope of this document, the following is the basic process for creating an Android virtual device:
1. Start a command line window and navigate to the SDK's tools subdirectory.
2. First, you need to select a deployment target. Display the available targets. Execute:
The console outputs a list of currently available Android targets, for example:
Id: 1
Name: IOS 1.1
Type: platform
API level: 2
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
Id: 2
Name: IOS 1.5
Type: platform
API level: 3
Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
Find the target corresponding to the Android platform on which your application depends. Remember the integer value of the corresponding id-it will be used in the next step.
3. Create a new Android Virtual Device for the deployment target you selected. Run the following command:
- android create avd --name < your_avd_name> --target < targetID>
4. Next, you will be asked if you want to create a custom hardware device. If you select "yes", a series of prompts will appear next, defining all aspects of the hardware device using the default value of entries blank, the default value is the value in brackets ). Otherwise, press enter to select all default values "no ).
This section describes how to create Android Virtual Devices.