nativeInstallerjenkins

Use the Android SDK Manager plugin with Jenkins

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

When building an Android application using Gradle on Jenkins with the Android SDK Manager Gradle plugin, there may be an error running the aapt tool. Typically, this produces an error message like that shown below:

java.io.IOException: Cannot run program "/home/tomcat/.android-sdk/build-tools/22.0.1/aapt": error=2, No such file or directory
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
  at com.android.builder.png.AaptProcess$Builder.start(AaptProcess.java:163)
  at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:106)
  at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
  at java.lang.Thread.run(Thread.java:745)
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:248)
  at java.lang.ProcessImpl.start(ProcessImpl.java:134)
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
  ... 4 more

To resolve this, execute the following command to install missing libraries needed by the aapt command:

  • Debian:

    $ sudo apt-get install lib32stdc++6 lib32z1
    
  • CentOS:

    $ sudo yum install libstdc++.i686
    
Last modification September 12, 2018