-
Type:
New Feature
-
Resolution: Duplicate
-
Priority:
Minor
-
Component/s: android-emulator-plugin
-
None
-
Environment:Jenkins ver. 1.592, android-emulator 2.12
When using android-20 API as a target there is a error during creating AVD:
[android] /home/builder/android-sdk/android-sdk/tools/android create avd -f -a -s 720x1280 -n hudson_pl-PL_300_720x1280_android-20 -t android-20 --abi armeabi-v7a
[android] Failed to run AVD creation command
Error: Invalid --tag default for the selected target.
The solution to this problem is here http://stackoverflow.com/a/25598879/1204234 , but when the working --abi parameter is used eg. android-wear/armeabi-v7a then the name of the AVD become incorrect because there is a slash in it:
[android] /home/builder/android-sdk/android-sdk/tools/android create avd -f -a -s 720x1280 -n hudson_pl-PL_300_720x1280_android-20_android-wear/armeabi-v7a -t android-20 --abi android-wear/armeabi-v7a
[android] Failed to run AVD creation command
Error: AVD name 'hudson_pl-PL_300_720x1280_android-20_android-wear/armeabi-v7a' contains invalid characters.
Allowed characters are: a-z A-Z 0-9 . _ -
When I modified method getGeneratedAvdName() in EmulatorConfig.java in the way shown below
private String getGeneratedAvdName() {
..
String abi = "";
if (targetAbi != null && osVersion.requiresAbi())
...
}
Compiled plugin and replaced the original it is working