title: Firebase Messaging Error(Android only) - Fatal Exception on new Push Notification
body: <p>We are currently using flutter to develop an app that receives push notifications. Everything worked fine until we did the last Flutter update and now we get a Fatal Exception inside Firebase - FlutterFirebaseMessagingService on Android only. </p>
  
  <p>I couldn't find anything about this on the flutter git so it might be an android problem.</p>
  
  <p>This happens the moment when the app gets a new Notification using Firebase functions and Firebase Messaging. Sample Data we use:</p>
  
  <pre><code>{
    notification: {
          title: „hello",
          body: „You got a new Message"
      },
      data: {
          click_action: "FLUTTER_NOTIFICATION_CLICK",
          additional: additional, // some integer values
          message: messageText // Same as message body above
      },
      apns: {
          payload: {
              aps: {
                  badge: count,
              },
          },
      },
      token: deviceToken //this is a correct device id
  }
  
  
  admin.messaging().send(message)
  </code></pre>
  
  <p>Full Device Log</p>
  
  <blockquote>
    <p>E/AndroidRuntime( 3436): FATAL EXCEPTION:
    Firebase-FlutterFirebaseMessagingService E/AndroidRuntime( 3436):
    Process: de.mandarinmedien.jutta, PID: 3436 E/AndroidRuntime( 3436):
    java.lang.NoSuchMethodError: No static method
    zzc(Landroid/content/Context;)Lcom/google/firebase/iid/zzz; in class
    Lcom/google/firebase/iid/zzz; or its super classes (declaration of
    'com.google.firebase.iid.zzz' appears in
    /data/app/de.mandarinmedien.jutta-gn2RX8mWXXycpVEEEZIaNQ==/base.apk:classes3.dex)
    E/AndroidRuntime( 3436):        at
    com.google.firebase.messaging.FirebaseMessagingService.zzd(Unknown
    Source:110) E/AndroidRuntime( 3436):        at
    com.google.firebase.iid.zzg.run(Unknown Source:4) E/AndroidRuntime(
    3436):        at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    E/AndroidRuntime( 3436):        at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    E/AndroidRuntime( 3436):        at
    com.google.android.gms.common.util.concurrent.zza.run(Unknown
    Source:6) E/AndroidRuntime( 3436):        at
    java.lang.Thread.run(Thread.java:764)</p>
  </blockquote>
  
  <p>Does anyone already have experience with this error or has an idea how to solve it ?</p>
  
  <p>Edit: android/app/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("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  }
  
  apply plugin: 'com.android.application'
  apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  
  def keystorePropertiesFile = rootProject.file("key.properties")
  def keystoreProperties = new Properties()
  keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  
  android {
      compileSdkVersion 27
  
      lintOptions {
          disable 'InvalidPackage'
      }
  
      defaultConfig {
          applicationId ******
          minSdkVersion 16
          targetSdkVersion 27
          versionCode 1
          versionName "0.1"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          multiDexEnabled true
      }
  
      signingConfigs {
          release {
              keyAlias keystoreProperties['keyAlias']
              keyPassword keystoreProperties['keyPassword']
              storeFile file(keystoreProperties['storeFile'])
              storePassword keystoreProperties['storePassword']
          }
      }
      buildTypes {
          release {
              signingConfig signingConfigs.debug
              minifyEnabled true
              useProguard true
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  
          }
      }
  }
  
  flutter {
      source '../..'
  }
  
  dependencies {
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.1'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
      implementation 'com.google.firebase:firebase-perf:16.0.0'
  }
  
  apply plugin: 'com.google.gms.google-services'
  apply plugin: 'com.google.firebase.firebase-perf'
  </code></pre>
  
  <p>android/build.gradle</p>
  
  <pre><code>buildscript {
      repositories {
          google()
          jcenter()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:3.0.1'
          classpath 'com.google.gms:google-services:3.2.1'
          classpath 'com.google.firebase:firebase-plugins:1.1.5'
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  rootProject.buildDir = '../build'
  subprojects {
      project.buildDir = "${rootProject.buildDir}/${project.name}"
  }
  subprojects {
      project.evaluationDependsOn(':app')
      project.configurations.all {
          resolutionStrategy.eachDependency { details -&gt;
              if (details.requested.group == 'com.android.support'
                      &amp;&amp; !details.requested.name.contains('multidex')) {
                  details.useVersion "27.1.1"
              }
          }
      }
  
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>