在jenkins中构建gradle未能找到Build Tools修订版21.1.1

时间:2015-09-18 09:01:12

标签: android android-studio jenkins

我在AWS上使用Ubuntu 14+配置了jenkins。我安装了sdk,jdk,git,并设置了ANDROID_HOME。但是,我无法创建avd,而且我也无法使用gradle文件进行构建:

clean -b app/build.gradle

安装sdk:

cd /var/lib/jenkins/tools
wget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz
tar xvfz android-sdk_r23.0.2-linux.tgz
mv android-sdk-linux android-sdk

检查SDK的安装:

/var/lib/jenkins/tools/android-sdk/tools/android list sdk -a

安装选定的SDK:

/var/lib/jenkins/tools/android-sdk/tools/android update sdk --no-ui --all --filter build-tools-21.1.1

我得到的错误:

What went wrong:
A problem occurred configuring project ':app'.
failed to find Build Tools revision 21.1.1

1 个答案:

答案 0 :(得分:1)

this Error

此图片中显示错误

安装sdk

cd / var / lib / jenkins / tools wget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz tar xvfz android-sdk_r23.0.2-linux.tgz mv android-sdk-linux android-sdk

gradle build

clean -b Sports / build.gradle

更新sdk

/ var / lib / jenkins / tools / android-sdk / tools / android update sdk -u -t tool,platform-tool -a

检查sdk已安装

/ var / lib / jenkins / tools / android-sdk / tools / android list sdk -a

安装sdk

/ var / lib / jenkins / tools / android-sdk / tools / android update sdk --no-ui --all --filter build-tools-21.1.1