1

我在本地系统上使用 jenkins 并添加了一个 android 模拟器插件,但它给我过时的 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
4

2 回答 2

1

我现在在 ubuntu 服务器上处理完全相同的问题。我所做的 - 手动下载 sdk 工具并将它们安装在我的 /usr/lib/android-sdk 文件夹中

  • wget -O sdk-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
  • sudo apt install unzip
  • unzip sdk-tools.zip

这个问题现在对我来说在詹金斯上消失了。

于 2020-09-25T12:04:16.470 回答
0

遵循步骤

  1. 管理 Jenkins -> 配置系统 -> 滚动到底部
  2. 取消选中Automatically install Android components when required
于 2021-09-21T14:41:38.820 回答