I am using jenkins on my local system and added an android emulator plugin but it is giving me error for the outdated SDK.
> C:\Program Files\Git\bin\git.exe rev-list --no-walk f04a1c2fe717dc9b6a3a329636f418e3dc853585 # timeout=10
[android] Outdated SDK Tools found. Upgrading from '26.1.1' to 'build 6609375'
[android] Android SDK installation failed
[android] hudson.plugins.android_emulator.SdkInstallationException: Failed to download Android SDK
at hudson.plugins.android_emulator.SdkInstaller.doInstall(SdkInstaller.java:91)
at hudson.plugins.android_emulator.SdkInstaller.install(SdkInstaller.java:72)
at hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:278)
at hudson.model.Build$BuildExecution.doRun(Build.java:157)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1894)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
Caused by: java.io.IOException: Failed to donwload SDK archive
at hudson.plugins.android_emulator.SdkInstaller.installBasicSdk(SdkInstaller.java:189)
at hudson.plugins.android_emulator.SdkInstaller.doInstall(SdkInstaller.java:89)
... 8 more
Finished: NOT_BUILT
I'm dealing with the exactly same issue on ubuntu server now. What I've done - manually downloaded sdk tools and installed them in my /usr/lib/android-sdk folder
wget -O sdk-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zipsudo apt install unzipunzip sdk-tools.zipand this issue disappeared on jenkins for me now.