无法创建Android模拟器:无法解析AVD配置文件 [英] Could not create Android emulator: Failed to parse AVD config file

查看:245
本文介绍了无法创建Android模拟器:无法解析AVD配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无头Linux 64位. Jenkins尝试创建android模拟器,但以下设置失败:

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

还尝试了针对同一设备的其他ABI:armeabi_v7和google_apis/x86

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

由于我需要Google Play服务,因此我试图创建这种设备. 我能够使用以下设置创建并运行模拟器:

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'

但是该模拟器不支持Google Play服务(更具体的说是Google Maps),所以我不想要它.

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

推荐答案

我在Mac book pro 13"(macOS Sierra;版本10.12.3)中遇到了类似的问题.我删除了用于android sdk和amp位置的系统环境变量.当我使用system environment variables构建它时; Jenkins下载了sdk,并且该sdk正常运行.

I had faced the similar problem in Mac book pro 13", macOS Sierra; version 10.12.3. I deleted the system environment variables for location to android sdk & gradle previously which I added. When I built it with system environment variables; Jenkins downloaded the sdk & it run without failure.

您还可以参考《 Expert Android Studio by Murat Yener, Onur Dundar》第10章:持续集成.他们展示了如何在詹金斯基础上发展.

You can also refer to the book Expert Android Studio by Murat Yener, Onur Dundar chapter 10 : Continuous integration; where they showed how to build on Jenkins.

这篇关于无法创建Android模拟器:无法解析AVD配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆