React Native run android error Could not find method google()

狂风中的少年 提交于 2020-01-25 10:21:05

问题


i use Android studio 2.3.3 npm -v 6.12.0 react-native --version 3.0.4

buildscript {
    ext {
        buildToolsVersion = "25.0.3"
        minSdkVersion = 15
        compileSdkVersion = 25
        targetSdkVersion = 25
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:2.3.3")

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

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 {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

run react-native and get error in line 11 google() in install app on simulator

来源:https://stackoverflow.com/questions/59345181/react-native-run-android-error-could-not-find-method-google

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!