Failed to create Android emulator: failed to parse AVD configuration file

Headless Linux 64-bit. Jenkins tries to create an Android emulator, but does not complete 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 another ABI for the same device: armeabi_v7 and google_apis / x86

I’m trying to create this device because I need Google Play services. I managed to create and run the emulator with the 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 does not support Google Play services (more precisely, Google Maps), so I do not want this.

+5
source share
2 answers

I found a workaround for this:

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

And it worked, Google Maps is also supported.

+1
source

I ran into a similar problem on Mac book pro 13 ", macOS Sierra, version 10.12.3. I deleted the system environment variables for the location for android sdk and gradle that I previously added. When I built it using system environment variables ; Jenkins downloaded sdk and it works without crashing.

You can also refer to Expert Android Studio by Murat Yener, Onur Dundar , Chapter 10: Continuous Integration; where they showed how to build Jenkins.

+1
source

All Articles