1

I was trying to build my android studio project set up with jenkins, I get into an error adb not found ,, i am using the gradle emulator plugin.

 java.io.IOException: Cannot run program "/var/lib/jenkins/tools/android-sdk/platform-tools/adb": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:803) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at hudson.plugins.android_emulator.AndroidEmulator.doSetUp(AndroidEmulator.java:304) at hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:263) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:186) at java.lang.ProcessImpl.start(ProcessImpl.java:130) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) ... 12 more 

Finished: FAILURE

$ /var/lib/jenkins/tools/android-sdk/tools/android list target [android] Using Android SDK: /var/lib/jenkins/tools/android-sdk $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb start-server 

it seems like jenkins is using the android sdk folder, so I don't think its a path related issue

in local mechine I've had this same error before ( the solution was to install a collection of libraries)

sudo apt-get install ia32-libs 

but i'm not sure how to do it in jenkins..

any thoughts? thanks

3
  • Did you specify the path to your Android home on Jenkins? Commented Jun 18, 2015 at 11:47
  • Log in to that machine and run the apt-get command. Commented Jun 18, 2015 at 19:51
  • stackoverflow.com/a/19524010/1778421 Commented Jun 18, 2015 at 20:57

2 Answers 2

4

you should configure ANDROID_HOME in jenkins

  1. open jenkins
  2. login with admin
  3. click manage jenkins on left menu
  4. click configure system
  5. set ANDROID_HOME

enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

That has been set and its using it also I think,I 've updated the question
@P-RAD Was your issue resolved? How did you get through this?
I'm sorry. I haven't actually. Project which I was working on got dropped
0

You need to specify your adb path in the Jenkins in the execute shell in the Build step.

export Path = "which ever your path is"

you can get your adb path with which adb

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.