Android java.lang.IllegalStateException:名为[DEFAULT]的FirebaseApp不';不存在

Android java.lang.IllegalStateException:名为[DEFAULT]的FirebaseApp不';不存在,android,firebase,firebase-cloud-messaging,Android,Firebase,Firebase Cloud Messaging,app base build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "24.0.1" defaultConfig { applicationId "com.example" minSdkVersion 16 targetSdkVersion 23 versionCode 1 versionName "

app base build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "24.0.1"

defaultConfig {
    applicationId "com.example"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}

dexOptions {
    javaMaxHeapSize "4g"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

 dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:design:24.1.1'
/*compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'*/
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.google.android.gms:play-services-location:9.4.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
}
apply plugin: 'com.google.gms.google-services'
项目级构建

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

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

allprojects {
repositories {
    jcenter()
}
}
这是我的日志

java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.

迁移到Firebase云消息后。打开我的应用程序时,它会崩溃并抛出一个错误,提示
java.lang.IllegalStateException:名为[DEFAULT]的FirebaseApp不存在
。我已经把我的新的
googleservices.json
放进了我的SDK。我想不出这个问题。我已经实现了与Firebase文档相同的功能。

可能重复@Rushi M Thakker,感谢budy您的评论,其中提到了重复问题解决我的问题无问题兄弟。我的荣幸:)可能重复@Rushi M Thakker感谢budy您的评论,其中提到重复问题解决我的问题没有问题,兄弟。我的荣幸:)