错误:无法为新模拟器运行AVD创建命令

时间:2018-08-29 05:22:20

标签: android jenkins

我在Jenkins(版本2.138)中遇到以下错误,我看到了相同的问题,但结果对我而言不起作用,因此将其单独提出。 错误:
对于新的模拟器: 无法运行AVD创建命令。
对于现有的:

java.io.FileNotFoundException: C:\Windows\system32\config\systemprofile\.android\avd\Nexus_5_API_26.ini (The system cannot find the path specified)

详细信息:
Windows 7,Appium v​​1.8.1,Android Studio 3.1.4,配置的模拟器:Nexus 5 API 26,大小:4.95,分辨率:1080x1920,密度:xxhdpi,OS:8.0,ABI:x86。
在Eclipse Oxygen(4.7.3a)POM中,maven-compiler-plugin:3.1,testng:6.13.1,java-client:6.0.0-BETA5,selenium-server:3.12.0。

当我启动模拟器并在Eclipse中运行脚本时,执行是完美的,但是当我在Jenkins中运行相同的脚本时,我遇到了以上错误, 在插件管理器中安装了“ Android Emulator Plugin”。 在“配置系统Android SDK根目录”中,指定路径“ C:\ Users \ svijay \ AppData \ Local \ Android \ Sdk”

在“项目配置”的“构建环境”选项卡中,选择“在构建过程中运行Android模拟器”->选择“运行现有的模拟器”,并将AVD名称输入为“ Nexus_5_API_26”

在“构建环境”选项卡→“通用仿真器”选项中,“选定的在启动时重置仿真器状态并显示仿真器”窗口 在“构建”选项卡→“安装Android软件包”中,输入APK文件“ C:\ Users \ con_svijay02 \ AppData \ Local \ Android \ Sdk \ emulator” `在工作空间C:\ Program Files(x86)\ Jenkins \ workspace \ SiteSurvey端到端测试中构建

 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository

 > git.exe config remote.origin.url https://github.com/mobilesitesurveytestautomation # timeout=10
Fetching upstream changes from `https://github.com/mobilesitesurveytestautomation`

 > git.exe --version # timeout=10
using GIT_ASKPASS to set credentials 



> git.exe fetch --tags --progress https://github.com/mobilesitesurveytestautomation +refs/heads/*:refs/remotes/origin/*



> git.exe rev-parse "refs/remotes/origin/development^{commit}" # timeout=10

 > git.exe rev-parse "refs/remotes/origin/origin/development^{commit}" # timeout=10
Checking out Revision b6477568b8a03f683b678d9872e846113a467ca2 (refs/remotes/origin/development)



> git.exe config core.sparsecheckout # timeout=10



> git.exe checkout -f b6477568b8a03f683b678d9872e846113a467ca2
Commit message: "reduced wait time in survey page to 5"
 > git.exe rev-list --no-walk b6477568b8a03f683b678d9872e846113a467ca2 # timeout=10
FATAL: C:\Windows\system32\config\systemprofile\.android\avd\Nexus_5_API_26.ini (The system cannot find the path specified)
java.io.FileNotFoundException: C:\Windows\system32\config\systemprofile\.android\avd\Nexus_5_API_26.ini (The system cannot find the path specified)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileReader.<init>(Unknown Source)
    at 

hudson.plugins.android_emulator.util.ConfigFileUtils.parseSimpleINIFormatFile(ConfigFileUtils.java:77)
    at hudson.plugins.android_emulator.util.ConfigFileUtils.parseConfigFile(ConfigFileUtils.java:37)
    at hudson.plugins.android_emulator.SdkInstaller$3.call(SdkInstaller.java:423)
    at hudson.plugins.android_emulator.SdkInstaller$3.call(SdkInstaller.java:420)
    at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
    at hudson.plugins.android_emulator.SdkInstaller.getPlatformFromExistingEmulator(SdkInstaller.java:420)
    at hudson.plugins.android_emulator.SdkInstaller.getPlatformForEmulator(SdkInstaller.java:404)
    at hudson.plugins.android_emulator.SdkInstaller.installDependencies(SdkInstaller.java:256)
    at hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:294)
    at hudson.model.Build$BuildExecution.doRun(Build.java:157)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
    at hudson.model.Run.execute(Run.java:1815)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
[SiteSurvey End to End Test] $ "C:\Program Files (x86)\Jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\Allure\bin\allure.bat" generate -c -o "C:\Program Files (x86)\Jenkins\workspace\SiteSurvey End to End Test\allure-report"
allure-results does not exists
Report successfully generated to C:\Program Files (x86)\Jenkins\workspace\SiteSurvey End to End Test\allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Finished: FAILURE`

0 个答案:

没有答案