持续集成 jenkins 上用 gradle 构建 Android 代码,编译报错:Could not find com.android.tools.build:gradle:3.0.0.

Caroline · 2018年05月02日 · 1427 次阅读

jenkins 上用 grade 构建时,编译报错,谷歌了很久未解决,很多人在 build.gradle 文件中加了 maven { url 'https://maven.google.com' }或者 google() 就可以了,但是我这还是报错,
报错信息:

* What went wrong:
A problem occurred configuring project ':landimupdf'.
> Could not resolve all files for configuration ':landimupdf:classpath'.
   > Could not find com.android.tools.build:gradle:3.0.0.
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
         https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
     Required by:
         project :landimupdf

jenkins 中全局工具配置 gradle:

build.gradle 配置:

gradle-wrapper.properties:

共收到 0 条回复 时间 点赞
Caroline 关闭了讨论 05月09日 16:00
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册