В моем собственном приложении-реактиве я добавил FireBase, поэтому мой корневой и основной приложения:
root build.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()
}
}
...
app build.gradle:
...
dependencies {
...
implementation 'com.android.support:design:${rootProject.ext.supportLibVersion}'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.google.firebase:firebase-core:16.0.1'
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
Когда я запускаю проект, приложение падает; Но когда я комментирую эту строку:
// apply plugin: 'com.google.gms.google-services'
приложение работает правильно.
Я был разрушен, пожалуйста, помогите мне:)