小编hos*_*abi的帖子

通过添加以下行来反应本机应用程序崩溃:apply plugin: 'com.google.gms.google-services'

在我的 React Native 应用程序中,我添加了 firebase ,所以我的根 gradle 和应用程序 gradle 是:

根构建.gradle:

buildscript {
ext {
   ...
}
repositories {
    google()       
    maven {
         url 'https://maven.fabric.io/public'
    }
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.4'
    classpath 'com.google.gms:google-services:4.0.1'

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

allprojects {
    repositories {
       mavenLocal()
       google()        
       maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url "$rootDir/../node_modules/react-native/android"
       }
       jcenter()
   } …
Run Code Online (Sandbox Code Playgroud)

android firebase react-native

5
推荐指数
1
解决办法
1471
查看次数

标签 统计

android ×1

firebase ×1

react-native ×1