I'm working in integrating Fabric crashlytics in android react native app following this tutorial. But after installing Fabric package using react-native install react-native-fabric
I try to lunch the app with npm run android
I got this error:
A problem occurred configuring project ':react-native-fabric'.
Could not resolve all files for configuration ':react-native-fabric:classpath'.
Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar
My build.gradle
:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"
googleServicesVersion = "17.1.0"
}
repositories {
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:1.+'
}
}
plugins {
id 'com.palantir.git-version' version '0.11.0'
}
allprojects {
repositories {
mavenLocal()
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" }
google()
maven { url 'https://oss.sonatype.org/service/local/repositories/snapshots/content/' }
maven { url 'https://oss.sonatype.org/service/local/repositories/releases/content/' }
jcenter()
}
tasks.whenTaskAdded { task ->
if (task.name.contains("lint")) {
if (!task.toString().contains("app")) {
task.enabled = false
}
}
}
}
ext {
apkCode = 1
// Apisense dependecies
apisenseVersion = "1.12.0.beta2"
apisenseDevVersion = "1.13.1-alpha-SNAPSHOT"
intentStingVersion = "0.0.1-alpha"
intentStingDevVersion = "0.0.1-alpha-SNAPSHOT"
}