找不到io.fabric.tools:gradle:1.28.1

时间:2019-07-17 07:53:15

标签: android firebase react-native react-native-android crashlytics

我想在我的项目上安装Firebase Crashlytics,但是在构建时遇到了这样的问题

尝试过 -我可以发表评论//应用插件:“ io.fabric” -我将版本类路径'io.fabric.tools:gradle:1.28.1'放到了classpath 'io.fabric.tools:gradle:1.28.0'

android / build.gradle

        classpath 'com.google.gms:google-services:4.2.0'
        classpath 'io.fabric.tools:gradle:1.28.1'
  maven {
            url 'https://maven.fabric.io/public'
        }

gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

proguard-rules.pro

-keep class io.invertase.firebase.** { *; }
-dontwarn io.invertase.firebase.**

app / build.gradle

    // Firebase dependencies
    implementation "com.google.android.gms:play-services-base:16.1.0"
    implementation "com.google.firebase:firebase-core:16.0.9"
    implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
        transitive = true
    }


apply plugin: "io.fabric"

问题

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find io.fabric.tools:gradle:1.28.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.pom
       - https://dl.google.com/dl/android/maven2/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.jar
       - https://jcenter.bintray.com/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.pom
       - https://jcenter.bintray.com/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.jar
     Required by:
         project :

2 个答案:

答案 0 :(得分:2)

将以下代码添加到app / build.gradle

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }
..........
 }

答案 1 :(得分:0)

尝试

project.gradle

X = [sum(e) for e in zip(X , Y[j][count:count+4])]

app / build.gradle

dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'

    }