【发布时间】:2023-03-12 06:21:02
【问题描述】:
我在使用 Gradle 插件在 Jenkins 上设置 Android 项目时遇到问题。我收到以下错误消息:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'tablet_optimizations'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:1.3.1.
Required by:
:tablet_optimizations:unspecified
> Could not resolve com.android.tools.build:gradle:1.3.1.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom'. Received status code 403 from server: Forbidden
这是通过代理从 SVN 拉出一个 repo,这两者似乎都设置正确。但也许这可能是一个问题。我也指向这个项目的 Gradle 2.4。我在这里看到了一些与此类似的问题,但似乎没有任何帮助。如果需要,我会更新任何其他信息!请帮忙!!!谢谢!
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
【问题讨论】:
-
你的 jenkins 服务器有最新的 android 构建工具吗?
-
我让它指向最近的sdk。这将包括构建工具吗?
-
@sasikumar 类路径根据该论坛帖子是正确的,并且包装器属性看起来也不错但是,我没有使用包装器,而是机器上的等级实例
-
你能发布你的gradle文件吗
标签: android svn jenkins gradle continuous-integration