[英]Jenkins Pipeline does not detect Android Emulator
I am using Jenkins Pipeline to Checkout,Build and Launch Espresso tests on my emulator before archiving the APK,The problem is that I cannot launch the emulator automatically from Jenkins.However with the same command from Windows command line I am able to run the emulator: 我在存档APK之前使用Jenkins Pipeline在我的模拟器上签出,构建和启动Espresso测试,问题是我无法从Jenkins自动启动模拟器,但是使用Windows命令行中的相同命令我可以运行模拟器:
Script 脚本
node{
// Previous stages and some magic...
stage('Test') {
bat "D:\\Tools\\Dev\\sdk\\tools\\emulator.exe -avd Nexus_5X_Marshmallow_API_23"
}
}
Screenshots of Jenkins Logs and same command on windows Does anybody have an idea about what can be done to fix this issue ? Jenkins Logs的屏幕截图和Windows上的相同命令是否有人知道如何解决此问题?
You shuold try running your command with single quotation marks: 您应该尝试使用单引号将命令运行:
bat 'D:\\Tools\\Dev\\sdk\\tools\\emulator.exe -avd Nexus_5X_Marshmallow_API_23'
I am also not shure if you need to escape your path. 如果您需要走自己的路,我也不敢恭维。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.