React Native运行android错误找不到方法google()

我使用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' }
    }
}

运行react-native并在模拟器上的安装应用中的第11行 google()中出现错误

adsaad 回答:React Native运行android错误找不到方法google()

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2918151.html

大家都在问