0

I am trying to build an Android project in Hudson.

The console output is as follows:

At revision 352
no change for  since the previous build

[android] Using Android SDK: D:\android -copy files\Android\Android\android-sdk-windows
[android] Starting Android emulator
$ "D:\android -copy files\Android\Android\android-sdk-windows/tools/emulator.exe" -ports 54298,54299 -no-boot-anim -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-10
[android] Waiting for emulator to finish booting...
...
[android] Attempting to unlock emulator screen
...
[android] Emulator is ready for use (took 123 seconds)
[android] Stopping Android emulator
[android] Archiving emulator log
Finished: SUCCESS

But the problem is that the emulator is opened and the installation of the APK file in the emulator is not shown, even though I have selected the job configuration option "Show emulator window".

How can I make the emulator visible during the build process?

Christopher Orr
  • 110,418
  • 27
  • 198
  • 193
User1990
  • 1
  • 1

1 Answers1

0

Firstly, you should upgrade from Hudson to Jenkins. Especially as the Android Emulator Plugin hasn't been supported for a while.

Secondly, your main problem is likely covered by the "Known Issues" section on the Jenkins wiki page for the plugin:

Emulator UI doesn't appear when running on Windows 7

If running Jenkins as a service on Windows 7 or newer, you may find that while the plugin can start an emulator, its user interface may not appear, even if configured to do so. This is due to something called Session 0 Isolation, which prevents services from starting UIs for security reasons.

If you really need to see the emulator UI, you can either run Jenkins not as a service, or add a slave node to Jenkins (e.g. launch slave via JNLP on the same machine) which will bypass this isolation.

Finally, you mention installation of an APK file in your build. But looking at the console output, you're only starting the emulator — you're not running any other tasks, like the "Install Android package" build step.

Community
  • 1
  • 1
Christopher Orr
  • 110,418
  • 27
  • 198
  • 193
  • Hi i tried with jenkins ...But here too the emulator is not opening – User1990 Aug 05 '13 at 13:13
  • i Have attached the console output. – User1990 Aug 05 '13 at 13:14
  • EvenThough it is coming SUCCESS for installation.The emulator is not opened and the installation of the application is not taking place."Install Android Package" is also im using as you suggested.Im working on Windows Xp Machine.Please help to display the Emulator and installation ofApk file.(FYI)I'm using Already existing emulator in the system.Thanks in Advance. – User1990 Aug 05 '13 at 13:20
  • [android] Installing APK file 'Helloworld.apk' [bin] $ "D:\android -copy files\Android\Android\android-sdk-windows/platform-tools/adb.exe" -s localhost:51542 install -r Helloworld.apk pkg: /data/local/tmp/Helloworld.apk Success 51 KB/s (13354 bytes in 0.251s) [android] Monkeying around with 'com.test.helloworld' (events: 5,000, seed: 0)... $ "D:\android -copy files\Android\Android\android-sdk-windows/platform-tools/adb.exe" -s localhost:51542 shell monkey -v -v -p com.test.helloworld -s 0 --throttle 100 5000 – User1990 Aug 05 '13 at 13:24
  • $ "D:\android -copy files\Android\Android\android-sdk-windows/platform-tools/adb.exe" disconnect localhost:51542 [android] Stopping Android emulator [android] Archiving emulator log $ "D:\android -copy files\Android\Android\android-sdk-windows/platform-tools/adb.exe" kill-server emulator: warning: opening audio input failed – User1990 Aug 05 '13 at 13:28