title: Flutter Default FirebaseApp is not initialized in this process com.viainno.homego. Make sure to call FirebaseApp.initializeApp(Context) first
body: <p><strong>Update 2020/12/11</strong>
  The problem solved.
  The problem occurs because i edit the manifest in the plugin.</p>
  <pre><code>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    package=&quot;com.tungwang.tappayflutterplugin&quot;&gt;
  
  &lt;!--    &lt;application--&gt;
  &lt;!--        xmlns:tools=&quot;http://schemas.android.com/tools&quot;--&gt;
  &lt;!--        tools:node=&quot;replace&quot;--&gt;
  &lt;!--        /&gt;--&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  <p>I comment the content then migrate it to my app's manifest.</p>
  <pre><code>&lt;application
          android:name=&quot;.Application&quot;
          android:label=&quot;Home Go&quot;
          android:icon=&quot;@drawable/app_icon&quot;
          xmlns:tools=&quot;http://schemas.android.com/tools&quot;
          tools:replace=&quot;android:label&quot;&gt;
  </code></pre>
  <p>It works perfectly.</p>
  <p><strong>Problem</strong></p>
  <p>I got this error on android every time, and i can't receive message in my app.
  I've read many answers on stackoverflow, but still facing this error.
  I am really confused on this error.
  Would anybody help me?
  Thank a lot.</p>
  <p>I added google-service.json in android/app
  <a href="https://i.stack.imgur.com/8E3jM.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>This is my project level build.gradle.</p>
  <pre><code>buildscript {
      ext.kotlin_version = '1.3.50'
      repositories {
          google()
          jcenter()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:3.5.0'
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;
  
          //FCM
          // Add the google services classpath
          classpath 'com.google.gms:google-services:4.3.2'
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  rootProject.buildDir = '../build'
  subprojects {
      project.buildDir = &quot;${rootProject.buildDir}/${project.name}&quot;
  }
  subprojects {
      project.evaluationDependsOn(':app')
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  <p>This is my app level build.gradle.</p>
  <pre><code>def localProperties = new Properties()
  def localPropertiesFile = rootProject.file('local.properties')
  if (localPropertiesFile.exists()) {
      localPropertiesFile.withReader('UTF-8') { reader -&gt;
          localProperties.load(reader)
      }
  }
  
  def flutterRoot = localProperties.getProperty('flutter.sdk')
  if (flutterRoot == null) {
      throw new GradleException(&quot;Flutter SDK not found. Define location with flutter.sdk in the local.properties file.&quot;)
  }
  
  def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  if (flutterVersionCode == null) {
      flutterVersionCode = '1'
  }
  
  def flutterVersionName = localProperties.getProperty('flutter.versionName')
  if (flutterVersionName == null) {
      flutterVersionName = '1.0'
  }
  
  apply plugin: 'com.android.application'
  apply plugin: 'kotlin-android'
  apply from: &quot;$flutterRoot/packages/flutter_tools/gradle/flutter.gradle&quot;
  
  android {
      compileSdkVersion 28
  
      sourceSets {
          main.java.srcDirs += 'src/main/kotlin'
      }
  
      lintOptions {
          disable 'InvalidPackage'
      }
  
      defaultConfig {
          // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
          applicationId &quot;com.viainno.homego&quot;
          minSdkVersion 18
          targetSdkVersion 29
          versionCode flutterVersionCode.toInteger()
          versionName flutterVersionName
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
          multiDexEnabled true
      }
  
      buildTypes {
          release {
              // TODO: Add your own signing config for the release build.
              // Signing with the debug keys for now, so `flutter run --release` works.
              signingConfig signingConfigs.debug
          }
      }
  }
  
  flutter {
      source '../..'
  }
  
  dependencies {
      implementation &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version&quot;
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.1.1'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
      implementation 'com.google.firebase:firebase-messaging:20.2.4'
      implementation 'com.android.support:multidex:1.0.3'
  }
  
  //FCM
  // ADD THIS AT THE BOTTOM
  apply plugin: 'com.google.gms.google-services'
  </code></pre>