When trying to Sync Gradle I am getting the following error:
A problem occurred configuring project ':react-native-google-signin'.
> Could not resolve all artifacts for configuration ':react-native-google-signin:classpath'.
> Could not find com.android.tools.build:gradle:3.6.3.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.6.3/gradle-3.6.3.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.6.3/gradle-3.6.3.jar
Required by:
project :react-native-google-signin
I have had a search and I am unable to find an answer to this. A similar question here: React native android can not find com.android.tools.build:gradle:3.6.3
Looking at the above this suggests switching off Offline mode, which is not on, so, unfortunately, that is not the answer.
The root bundle.gradle file looks like this:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0-alpha1"
reactNativeVersion = "0.59.9"
googlePlayServicesAuthVersion = "16.0.1"
}
repositories {
google()
maven {
url 'https://maven.google.com/'
}
jcenter()
mavenCentral()
maven {
url 'https://maven.fabric.io/public'
}
maven { url 'https://dl.bintray.com/android/android-tools' }
maven {url "$projectDir/../node_modules/react-native/android"}
}
dependencies {
classpath('com.android.tools.build:gradle:3.4.1')
classpath 'com.google.gms:google-services:4.1.0'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
// React native video - exoplayer missing from google repos, temp fix
maven {
url "https://google.bintray.com/exoplayer/"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
// configurations.all {
// resolutionStrategy {
// force 'com.facebook.android:facebook-android-sdk:4.28.0'
// }
// }
}
}
Based on the error it seems it only searches in jcenter and not the others? I am not sure, but when I searched online this specific build is available from maven.google.com which is included?