如果没有更改源代码,Bitrise Android构建会失败吗?

时间:2018-10-30 02:31:13

标签: android android-studio react-native google-play-services bitrise

我刚刚在一个不变的Android项目上触发了一个新的Bitrise构建,以发现此错误:

FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:[REDACTED]CompileClasspath'.
> Could not find play-services-identity.aar (com.google.android.gms:play-services-identity:11.8.0).
  Searched in the following locations:
      https://jcenter.bintray.com/com/google/android/gms/play-services-identity/11.8.0/play-services-identity-11.8.0.aar
> Could not find firebase-iid.aar (com.google.firebase:firebase-iid:11.8.0).
  Searched in the following locations:
      https://jcenter.bintray.com/com/google/firebase/firebase-iid/11.8.0/firebase-iid-11.8.0.aar
> Could not find firebase-common.aar (com.google.firebase:firebase-common:11.8.0).
  Searched in the following locations:
      https://jcenter.bintray.com/com/google/firebase/firebase-common/11.8.0/firebase-common-11.8.0.aar
> Could not find play-services-tasks-license.aar (com.google.android.gms:play-services-tasks-license:11.8.0).
  Searched in the following locations:
      https://jcenter.bintray.com/com/google/android/gms/play-services-tasks-license/11.8.0/play-services-tasks-license-11.8.0.aar

我正在使用React Native以及tipsi-stripe之类的库等。我不知道此错误来自何处,因为它与我端的任何新功能/代码均不相关。我该如何解决?

我的build.gradle中确实有这行:

implementation "com.google.android.gms:play-services-base:11.6.0"

我也有这个:

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url 'https://maven.google.com'
        }
        maven {
            url "https://jitpack.io"
        }
    }
}

1 个答案:

答案 0 :(得分:1)

有一个discussion from bitrise site表示:

  

有一个持续的jcenter.bintray.com问题影响着所有人   从jcenter.bintray.com下载Android软件包。

有一个简单而可靠的解决方案,可以在Android项目中配置 Bitrise Build Cache ,这样就可以缓存您的依赖项,而不必从中下载双托盘。这是How to cache Gradle dependencies上的指南。