When compiling a program with a new version of Android, an error message is displayed: Still no compatible avds with target 'Google APIs'
AVD is an android virtual device. It is a virtual device of the Android platform. When you start to compile an android program, you must have a matching virtual device to present the android running interface.
To create an AVD, first open the command line tool CMD and enter the android SDK tools directory. Enter the following command:
[Java]View
Plaincopy
- Android list targets
The output results will display the currently available AVD device IDS (the actual output results are related to your environment ):
[Java]View
Plaincopy
- 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
Run the following command to create a virtual device:
[Java]View
Plaincopy
- Android create AVD -- name <your_avd_name> -- target <targetid>
- For example:
- Android create AVD -- name my_avd -- Target 2
Compile the program again to run the program.