gradle无法在远程jenkins服务器上构建Android项目

问题描述:

因为我在Ubuntu ec2服务器上远程运行Jenkins。我用命令如下安装支持库:gradle无法在远程jenkins服务器上构建Android项目

echo y | ./android更新SDK --no-UI --all --filter里面装的Android支持库 “超Android的支持”

,修订22.2

下列项目进行了安装路径的/ var/lib中/詹金斯/工具/ Android的SDK /演员/安卓/支持:

annotations 
design 
multidex 
NOTICE.txt 
README.txt 
samples 
source.properties 
v13 (containing android-support-v13.jar and /src folder) 
v17 (containing android-support-v17.jar and /src folder) 
v4 (containing android-support-v4.jar and /src folder) 
v7 (containing android-support-v7.jar and /src folder) 

但还是我有以下错误:

A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugCompile'. > Could not 
find com.android.support:appcompat-v7:22.2.0. Searched in the 
following locations: 
https://jcenter.bintray.com/com/android/support/appcompat-v7/22.2.0/appcompat-v7-22.2.0.pom 
https://jcenter.bintray.com/com/android/support/appcompat-v7/22.2.0/appcompat-v7-22.2.0.jar 
Required by: workspace:app:unspecified > Could not find 
com.android.support:support-v4:22.2.0. Searched in the following 
locations: 
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom 
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.jar 
Required by: workspace:app:unspecified 

好心帮

的Android SDK管理器下载Android的支持库(在extras)和支持库的M2回购将

如果您正在使用命令行服务器
安卓下载到你的Android SDK目录更新sdk --no-ui --all --filter 139