0
votes

What went wrong: A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApk'. A problem occurred configuring project ':react-native-spinkit'. Could not resolve all dependencies for configuration ':react-native-spinkit:classpath'. Could not resolve com.android.tools.build:gradle:2.0.0. Required by: Myproject:react-native-spinkit:unspecified Could not resolve com.android.tools.build:gradle:2.0.0. Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0/gradle-2.0.0.pom'. Could not HEAD 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0/gradle-2.0.0.pom'. Received status code 403 from server: Forb idden

android/build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            url "https://maven.google.com"
        }
        // Add jitpack repository (added by react-native-spinkit)
        maven { url "https://jitpack.io" }
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}
1

1 Answers

0
votes

The issue seems to be related to the version not supported com.android.tools.build:gradle:2.2.3.

You can try two thing here -

1) upgrade the versions to latest and try to build again.

2) Try to change version as given below to check if its working with version 2.0.0 or not

 classpath 'com.android.tools.build:gradle:2.2.3' 

with

classpath 'com.android.tools.build:gradle:2.0.0'.

Hope it solves your problem !