Updating Android SDK and Build‑Tools on Jenkins for Android APK Builds

This guide explains how to locate the Android SDK path in Jenkins, list available SDK components, upgrade a specific version of the tools and build‑tools, and verify the update so that Jenkins can successfully build Android APK packages after a toolchain upgrade.

Test Development Learning Exchange
Test Development Learning Exchange
Test Development Learning Exchange
Updating Android SDK and Build‑Tools on Jenkins for Android APK Builds

Welcome everyone to click "Like" and scan the QR code to follow, inviting more automation‑testing enthusiasts to join the learning community.

When a previously working Jenkins build task for Android APKs (Linux + Tomcat + Jenkins + Gradle) is broken after a developer upgrades the Android SDK tools or build‑tools, the following steps can resolve the issue.

Step 1: Open Jenkins and find the configured SDK path, then navigate to the /data/android_SDK/tools directory.

Step 2: Run the command ./android list sdk -a to list all SDK packages and locate the index number of the component you need to upgrade.

Step 3: Upgrade the selected component by executing sudo -i android update sdk -u -t 4 -a (replace 4 with the appropriate package index). Confirm the upgrade when prompted by typing y.

Step 4: Go to the /data/android_SDK/build-tools directory and verify that the latest version (e.g., 27.0.3) has been installed.

Step 5: After the upgrade completes, trigger the Jenkins build again; the job should now run normally, using the updated SDK and build‑tools.

Note: Specifying the exact version to upgrade avoids downloading the entire SDK, which can consume unnecessary disk space.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

SDKAndroidAutomationGradlebuild toolsJenkins
Test Development Learning Exchange
Written by

Test Development Learning Exchange

Test Development Learning Exchange

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.