Jenkins Android build fails - can't build libwebviewchromium.so

I wonder how it comes that the same operation can be successful when using a console and fail when using Jenkins.

Because Jenkins might not run with the same user (or on the same workstation, if the agent executing the job is a separate machine)

Double-check if there are any environment variable differences between:

  • your command-line, where you can successfully run your command (type env after your commands)
  • the environment variables you can see associated with your (failed) job

For instance, a LD_LIBRARY_PATH difference could explain the discrepancy between the two builds.


Make sure you have all the header files included and libraries linked at the time of compilation. Undefined Reference errors primarily arise due to these two reasons.


user jenkins has it's own ~/.bashrc, which might lack environmental variables.

temporarily enable login shell for jenkins, setup the environment, then disable it again.

when being able to manually build as user jenkins, it should also build when automated.