How to set path in Jenkins for directory having Android AVD?

筅森魡賤 提交于 2019-12-03 21:38:09

问题


When I try to build my android workspace using Jenkins Build Now option, It will show the error like

[android] Cannot start Android emulator: Could not start AVD 'Nexus_4', as it could 
not be found at 'C:\Windows\system32\config\systemprofile\.android\avd\Nexus_4.avd'
Recording test results
Finished: FAILURE

By default, directory for android avd is /users/user.name/.android. How can I provide this avd path to Jenkins? It always try to search avd in above given Windows location automatically.

Note : I am using Windows-7 OS.


回答1:


If your command runs fine on Win command prompt as user 'X', then you should run Jenkins with the same user.

This can be achieved by performing following steps:
1. Run > services.msc (Enter)
2. Select Jenkins service. Right-click and select Properties
3. Click on Log On tab
4. Select user 'X' and provide credentials
5. Restart Jenkins

In your case, the user 'X' seems to be user.name since the path to AVD as mentioned by you is /users/user.name/.android



来源:https://stackoverflow.com/questions/25801121/how-to-set-path-in-jenkins-for-directory-having-android-avd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!