Gradle build error with branch io and crashlytics

99封情书 提交于 2020-01-02 19:25:11

问题


Error:A problem occurred configuring root project 'app_name'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
 > Could not find com.crashlytics.sdk.android:answers-shim:0.0.3.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/crashlytics/sdk/android/answers-shim/0.0.3/answers-shim-0.0.3.pom
         https://repo1.maven.org/maven2/com/crashlytics/sdk/android/answers-shim/0.0.3/answers-shim-0.0.3.aar
         file:/Users/arun/repos/app_name/libs/answers-shim-0.0.3.aar
file:/Users/arun/repos/app_name/libs/answers-shim.aar
         https://maven.fabric.io/public/com/crashlytics/sdk/android/answers-shim/0.0.3/answers-shim-0.0.3.pom
         https://maven.fabric.io/public/com/crashlytics/sdk/android/answers-shim/0.0.3/answers-shim-0.0.3.aar
         file:/Users/arun/Library/Android/sdk/extras/android/m2repository/com/crashlytics/sdk/android/answers-shim/0.0.3/answers-shim-0.0.3.pom
         file:/Users/arun/Library/Android/sdk/extras/android/m2repository/com/crashlytics/sdk/android/answers-shim/0.0.3/answers-shim-0.0.3.aar
         file:/Users/arun/Library/Android/sdk/extras/google/m2repository/com/crashlytics/sdk/android/answers-shim/0.0.3/answers-shim-0.0.3.pom
         file:/Users/arun/Library/Android/sdk/extras/google/m2repository/com/crashlytics/sdk/android/answers-shim/0.0.3/answers-shim-0.0.3.aar
     Required by:
         :app_name:unspecified > io.branch.sdk.android:library:1.14.2

branch-io originally was io.branch.sdk.android:library:1+ I then tried

io.branch.sdk.android:library:1.14.1 and io.branch.sdk.android:library:1.14.2 with the same error.

Any ideas what is happening?


回答1:


com.crashlytics.sdk.android:answers-shim:0.0.3 isn't available on mavenCentral. Add jcenter to your repository section.

ref: https://bintray.com/fabric/fabric/com.crashlytics.sdk.android%3Aanswers-shim/view

Example:

repositories {
  jcenter()
}



回答2:


If you don't plan to use the Fabric Answers integration, and don't want to import the answers-shim, just import your project as follows:

replace io.branch.sdk.android:library:1.14.1 with

implementation ('io.branch.sdk.android:library:3.+') {
    exclude module: 'answers-shim'
}

Source - https://github.com/BranchMetrics/android-branch-deep-linking



来源:https://stackoverflow.com/questions/37974511/gradle-build-error-with-branch-io-and-crashlytics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!