2

As described in previous questions, it is known that Android virtual devices are saved by default to the path Documents and Settings\user\.android. Currently I have a Jenkins build server which is running the Jenkins process as a system account. When using the Android Emulator Plugin for Jenkins, if I attempt to select an emulator by "AVD Name", I'm unable to access the AVD devices that I've setup under my user account, which I'll refer to as myUserAccount. So the AVD device is currently saved under C:\Users\myUserAccount\.android\avd\x86NexusS and I'll receive an exception stating that the system cannot find the the avd under the system path:

FATAL: C:\WINDOWS\system32\config\systemprofile\.android\avd\x86NexusS.ini (The system cannot find the path specified)

There are a couple ways to solve this problem:

  1. (preferred) Find a way to access an AVD created under myUserAccount under the system account? **Does anyone have an idea on how to do this? **
  2. Somehow switch my user to the "system" account to create AVD profiles?
  3. (worst case) Run the Jenkins build process as myUserAccount - this is kludgy and not scaleable if other users want to change the build server.
Community
  • 1
  • 1
CrimsonX
  • 9,048
  • 9
  • 41
  • 52

1 Answers1

2

AVD is searching for the devices under its ANDROID_SDK_HOME by default, which points to %HOME%. You can probably make jenkins find your existing devices configurations by creating a ANDROID_SDK_HOME jenkins environment variable pointing to your C:\Users\myUserAccount.

However I find this a bit brittle and I would probably have made both your user and jenkins use a third party location (e.g. D:\JenkinsData\AVD) to store those files.

coffeebreaks
  • 3,787
  • 1
  • 26
  • 25