React native throws'无法解析com.android.tools.build:gradle:3.0.0。'

时间:2018-03-03 17:21:11

标签: javascript android react-native-android

我在react-native run-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'
        }
        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://jitpack.io"
        }
    }
}

0 个答案:

没有答案