当在android中运行时,应用已停止 - 反应本机firebase

问题描述 投票:3回答:1

我正在使用react-native-mapsreact-native-firebase。当我在运行react-native run-android时。我的应用程序是成功构建,但应用程序已停止。我已经尝试清理gradle,更改构建版本,但结果仍然相同

enter image description here

的build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'com.google.gms:google-services:3.1.1'

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

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        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://maven.google.com'
        }
    }
}

应用程序/的build.gradle

dependencies {
    compile project(':react-native-device-info')
    compile (project(':react-native-notifications')) {
        exclude group: 'com.google.android.gms'
    }
    compile project(':react-native-maps')
    compile project(':react-native-google-places')
    compile(project(':react-native-firebase')) {
        transitive = false
    }
    compile project(':react-native-facebook-login')
    compile project(':react-native-picker')
    compile (project(':react-native-maps')) {
        exclude group: 'com.google.android.gms'
    }
    compile (project(':react-native-google-places')) {
        exclude group: 'com.google.android.gms'
    }
    compile project(':react-native-config')
    compile project(':react-native-vector-icons')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+" // From node_modules
    // compile 'com.google.android.gms:play-services:11.4.2'

    compile (project(':react-native-facebook-login')) {
        exclude group: 'com.facebook.android'
    }
    compile "com.google.android.gms:play-services-base:11.6.0"
    compile "com.google.firebase:firebase-core:11.6.0"
    compile "com.google.firebase:firebase-messaging:11.6.0"
    compile "com.google.firebase:firebase-analytics:11.6.0"
    compile ("com.google.android.gms:play-services-gcm:11.6.0") {
        force = true
    }
    compile ("com.google.android.gms:play-services-maps:11.6.0") {
        force = true
    }
    compile ("com.google.android.gms:play-services-location:11.6.0") {
        force = true
    }
    compile ("com.google.android.gms:play-services-places:11.6.0") {
        force = true
    }
    compile 'com.facebook.android:facebook-android-sdk:4.20.0'
}

的package.json

"react-native": "^0.47.2",
"react-native-firebase": "^3.1.0",
"react-native-maps": "^0.16.4",

有人有想法解决这个问题吗?非常感谢

这是我的CataLog

--------- beginning of system
--------- beginning of crash
--------- beginning of main
11-27 10:06:46.876 10659 10659 D ReactNative: ReactInstanceManager.ctor()
11-27 10:06:46.906 10659 10659 D ReactNative: ReactInstanceManager.createReactContextInBackground()
11-27 10:06:46.907 10659 10659 D ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()
11-27 10:06:46.937 10659 10659 D ReactNative: ReactInstanceManager.onReloadWithJSDebugger()
11-27 10:06:46.938 10659 10659 D ReactNative: ReactInstanceManager.recreateReactContextInBackground()
11-27 10:06:46.938 10659 10659 D ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()
11-27 10:06:47.031 10659 10724 D ReactNative: ReactInstanceManager.createReactContext()
11-27 10:06:47.222 10659 10724 D ReactNative: Initializing React Xplat Bridge.
11-27 10:06:47.225 10659 10724 D ReactNative: Initializing React Xplat Bridge before initializeBridge
11-27 10:06:47.228 10659 10724 D ReactNative: Initializing React Xplat Bridge after initializeBridge
11-27 10:06:47.228 10659 10724 D ReactNative: CatalystInstanceImpl.runJSBundle()
11-27 10:06:47.229 10659 10659 D ReactNative: ReactInstanceManager.setupReactContext()
11-27 10:06:47.229 10659 10659 D ReactNative: CatalystInstanceImpl.initialize()
11-27 10:06:47.233 10659 10659 D ReactNative: ReactInstanceManager.attachRootViewToInstance()
11-27 10:06:48.288 10659 10659 D ReactNative: ReactInstanceManager.detachViewFromInstance()
android react-native react-native-firebase
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.