与分支io和crashlytics的Gradle构建错误

时间:2016-06-22 17:17:36

标签: android-studio gradle crashlytics

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最初是io.branch.sdk.android:library:1+然后我尝试了

io.branch.sdk.android:library:1.14.1io.branch.sdk.android:library:1.14.2出现同样的错误。

任何想法发生了什么?

2 个答案:

答案 0 :(得分:1)

com.crashlytics.sdk.android:answers-shim:0.0.3在mavenCentral上无法使用。将jcenter添加到存储库部分。

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

示例:

repositories {
  jcenter()
}

答案 1 :(得分:0)

如果您不打算使用Fabric Answers集成,并且不想导入answers-shim,只需按以下步骤导入您的项目:

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

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