简体   繁体   English

詹金斯不能解决依赖关系?

[英]Jenkins can not resolve dependencies?

I'm very new to Jenkins. 我对詹金斯很陌生。 When Jenkins is trying to build my project I get a error saying "Can not resolve dependencies". 当詹金斯(Jenkins)尝试构建我的项目时,出现错误消息“无法解析依赖项”。 Does anyone know a fix/ work around? 有人知道解决方法吗? Here is the error I get: 这是我得到的错误:

FAILURE: Build failed with an exception.
* What went wrong:
> Could not resolve all dependencies for configuration ':mobile:_ukDebugCompile'.
> Could not find com.android.support:appcompat-v7:20.0.0.
 Searched in the following locations:
https://jcenter.bintray.com/com/android/support/appcompat-v7/20.0.0/appcompat-v7-20.0.0.pom
     https://jcenter.bintray.com/com/android/support/appcompat-v7/20.0.0/appcompat-v7-20.0.0.jar
 Required by:
     project_name:mobile:unspecified

> Could not find any version that matches com.google.android.gms:play-services-wearable:+.
Searched in the following locations:
     https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/maven-metadata.xml
     https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/ Required by:
     project_name:mobile:unspecified

* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

I should mention there is no error in the project. 我应该提到项目中没有错误。 It compiles, runs fine when I do it locally. 它在本地编译时可以正常运行。

I found a work around! 我找到了解决方法!

If anyone is in the same position, try this: create a secondary git branch and make jenkins point the new branch. 如果有人在同一位置,请尝试以下操作:创建辅助git分支,并使jenkins指向新分支。 By doing this, the error didn't happen anymore. 通过这样做,该错误不再发生。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM