I was trying to integrate Firebase Crashlytics on my react native app but got this error while building the app.
- What went wrong: A problem occurred configuring root project 'MyApp'.
Could not resolve all artifacts for configuration ':classpath'. Could not find io.fabric.tools:gradle:1.26.1. Searched in the following locations: https://dl.google.com/dl/android/maven2/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.pom https://dl.google.com/dl/android/maven2/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.jar https://repo.maven.apache.org/maven2/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.pom https://repo.maven.apache.org/maven2/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.jar https://jcenter.bintray.com/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.pom https://jcenter.bintray.com/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.jar
Required by: project :
- Try:
I've added classpath 'io.fabric.tools:gradle:1.26.1'
in dependencies
and
maven { url 'https://maven.fabric.io/public' }
in repositories
in build.gradle
as suggested in documentation.
Before, I got the same issue because I moved the url 'https://maven.fabric.io/public'
to the wrong place
I guess you guy also same. My working build.grande
is
buildscript {
repositories {
google()
jcenter()
// Additional repository for fabric resources
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.2.0'
// Add fabric classpath
classpath 'io.fabric.tools:gradle:1.26.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
As per the documentation of the fabric integration.
Try using this as a sub-library of the project.
In your app's Gradle mention the below code. It will work.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With