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

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

问题描述

我在本地PC上安装了Jeknins.我能够成功将Android应用程序代码与github集成,并生成.apk文件作为工件. 问题出在测试用例的执行上.我无法启动Android模拟器. 它说:

I have a Jeknins installation on my local PC. I'm successfully able to integrate Android application code with github and generate .apk file as an artifact. The problem is in the test case execution. I cannot get the Android emulator to start. It says:

\ sdk/tools/android.bat"创建avd -f -a -c 500M -s 480x640 -n hudson_zh-CN_US_480_480x640_android-21_armeabi-v7a -t android-21 --abi armeabi-v7a [android]无法创建Android模拟器:无法解析AVD配置文件 记录测试结果.

\sdk/tools/android.bat" create avd -f -a -c 500M -s 480x640 -n hudson_en-US_480_480x640_android-21_armeabi-v7a -t android-21 --abi armeabi-v7a [android] Could not create Android emulator: Failed to parse AVD config file Recording test result.

我已经尝试过: 无法创建Android模拟器:无法解析AVD配置文件

此外,我从命令行运行了相同的create命令,它成功创建了AVD.

Also, I ran the same create command from command line and it successfully craeted the AVD.

推荐答案

不是一个完整的答案,但似乎最近出现的Andoid Sdk更新-SDK工具,修订版25.3.0(2017年3月)-已取得了一些进展.重大变化.

Not a complete answer, but it seems that the andoid Sdk update that came out recently - SDK Tools, Revision 25.3.0 (March 2017) - has made some significant changes.

Android模拟器jenkins插件使用 android 命令(/home/jenkins/Android/Sdk/tools/android ),但是如果我从控制台复制命令输出并尝试在我得到的Jenkins机器上从命令行运行该命令:

The Android emulator jenkins plugin uses the android command (/home/jenkins/Android/Sdk/tools/android), but if I copy the commands from the console output and try and run that from the command line on the Jenkins machine I get:

[android] /home/jenkins/Android/Sdk/tools/android create avd -f -a -s HVGA -n hudson_en-US_120_HVGA_7.02 -t 7.02
[android] Could not create Android emulator: Failed to parse AVD config file

并尝试在我得到的Jenkins机器上从命令行运行它:

and try and run that from the command line on the Jenkins machine I get:

The android command is no longer available.
For manual SDK and AVD management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager

因此,从25.3.0开始,似乎已经弃用了'android'命令,并且已将其删除,但是模拟器插件尚未更新以反映这一点.

So it seems that from 25.3.0 onwards, the 'android' command is deprecated and has been removed, but the emulator plugin hasn't been updated to reflect this.

作为一种解决方案,最好的选择似乎是安装一个仍支持'android'命令的android Sdk的较早版本,至少直到更新插件为止.

As a solution, the best bet seems to be to install an earlier version of the android Sdk that still supports the 'android' command, at least until the plugin is updated.

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

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