【问题标题】:gradle fails to build Android project on remote jenkins servergradle 无法在远程 jenkins 服务器上构建 Android 项目
【发布时间】:2015-07-10 12:31:09
【问题描述】:

因为我在 Ubuntu ec2 服务器上远程运行 Jenkins。我使用如下命令安装支持库:

回声 y | ./android update sdk --no-ui --all --filter "extra-android-support"

其中安装了 Android 支持库,修订版 22.2

以下项目安装在路径 /var/lib/jenkins/tools/android-sdk/extras/android/support 中:

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 jenkins gradle build


    【解决方案1】:

    Android SDK Manager 下载 Android Support Repository (in Extras),支持库的 M2 repo 将下载到您的 Android SDK 目录

    如果您使用的是命令行服务器
    android update sdk --no-ui --all --filter 139

    【讨论】:

      猜你喜欢
      • 2014-10-24
      • 2021-10-25
      • 2019-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-25
      相关资源
      最近更新 更多