Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not create Android emulator: Failed to parse AVD config file

Headless Linux 64-bit. Jenkins is trying to create android emulator but fails with these settings:

[android] Using Android SDK: /opt/android-sdk-linux
[android] Creating Android AVD: /var/lib/jenkins/.android/avd/hudson_en-US_120_768x1200_Google_Inc._Google_APIs_23_google_apis-x86.avd
[android] /opt/android-sdk-linux/tools/android create avd -f -a -s 768x1200 -n hudson_en-US_120_768x1200_Google_Inc._Google_APIs_23_google_apis-x86 -t "Google Inc.:Google APIs:23" --abi google_apis/x86_64
[android] Could not create Android emulator: Failed to parse AVD config file

Also tried other ABI's for same device: armeabi_v7 and google_apis/x86

I am trying to create this device like that because I need Google Play Services. I was able to create and run emulator with following settings:

[android] Using Android SDK: /opt/android-sdk-linux
[android] /opt/android-sdk-linux/tools/android create avd -f -a -s 768x1200 -n hudson_en-US_120_768x1200_android-23_armeabi-v7a -t android-23 --abi armeabi-v7a
[android] Creating Android AVD: /var/lib/jenkins/.android/avd/hudson_en-US_120_768x1200_Google_Inc._Google_APIs_23_google_apis-x86.avd
[android] Starting Android emulator
$ /opt/android-sdk-linux/tools/emulator -engine classic -ports 5730,5731 -report-console tcp:5847,max=60 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_120_768x1200_android-23_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window
[android] Emulator reported that the startup process is 'running'

But this emulator doesn't support Google Play services (Google Maps to be more specific), so I don't want it.

like image 719
Gert Avatar asked Oct 30 '22 03:10

Gert


1 Answers

I found temporary workaround for that:

Create that same device locally (I did it on my personal laptop, a MAC) with Android AVD manager. Then copy this newly created device to Linux server /var/lib/jenkins/.android/avd/ folder (.ini and .avd folder).

And it worked, also Google Maps is supported.

like image 177
Gert Avatar answered Nov 15 '22 06:11

Gert