title: react native app crash after sending notification from firebase via gcm
body: <p>whenever i try to send notification from firebase my app crash.</p>
  <p>then i am trying to figure it out where the crash come from with adb logcat.</p>
  <p>it seems like there is something wrong with gcm dependencies, i have no idea where the erorr come from.</p>
  <p>it said &quot;unable to instantiate receiver com.google.android.gms.gcm.GcmReceiver&quot;</p>
  <p>here is the error picture :
  <a href="https://i.stack.imgur.com/M5blx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M5blx.png" alt="app crashed" /></a></p>
  <p>my build.gradle dependecies :</p>
  <pre><code>implementation fileTree(dir: &quot;libs&quot;, include: [&quot;*.jar&quot;])
  implementation &quot;com.facebook.react:react-native:+&quot;  // From node_modules
  implementation 'com.google.firebase:firebase-analytics:17.2.2'
  implementation &quot;com.google.android.gms:play-services-base:16.1.0&quot;
  implementation &quot;com.google.firebase:firebase-core:16.0.9&quot;
  implementation &quot;com.google.firebase:firebase-messaging:18.0.0&quot;
  implementation project(':react-native-push-notification')
  </code></pre>
  <p>and my AndroidManifest.xml look like this :</p>
  <pre><code>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    package=&quot;com.hidroponik&quot;&gt;
  
      &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
      
      &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
      &lt;permission
          android:name=&quot;com.hidroponik.permission.C2D_MESSAGE&quot;
          android:protectionLevel=&quot;signature&quot; /&gt;
      &lt;uses-permission android:name=&quot;com.hidroponik.permission.C2D_MESSAGE&quot; /&gt;
      &lt;!-- &lt; Only if you're using GCM or localNotificationSchedule() &gt; --&gt;
      &lt;uses-permission android:name=&quot;android.permission.VIBRATE&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.RECEIVE_BOOT_COMPLETED&quot;/&gt;
  
      &lt;application
        android:name=&quot;.MainApplication&quot;
        android:label=&quot;@string/app_name&quot;
        android:icon=&quot;@mipmap/ic_launcher&quot;
        android:roundIcon=&quot;@mipmap/ic_launcher&quot;
        android:usesCleartextTraffic=&quot;true&quot;
        android:allowBackup=&quot;false&quot;
        android:theme=&quot;@style/AppTheme&quot;&gt;
        &lt;activity
          android:name=&quot;.MainActivity&quot;
          android:label=&quot;@string/app_name&quot;
          android:configChanges=&quot;keyboard|keyboardHidden|orientation|screenSize&quot;
          android:windowSoftInputMode=&quot;adjustResize&quot;&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
              &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
          &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity android:name=&quot;com.facebook.react.devsupport.DevSettingsActivity&quot; /&gt;
        
  
        &lt;meta-data  android:name=&quot;com.dieam.reactnativepushnotification.notification_channel_name&quot;
                  android:value=&quot;YOUR NOTIFICATION CHANNEL NAME&quot;/&gt;
          &lt;meta-data  android:name=&quot;com.dieam.reactnativepushnotification.notification_channel_description&quot;
                      android:value=&quot;YOUR NOTIFICATION CHANNEL DESCRIPTION&quot;/&gt;
          &lt;!-- Change the resource name to your App's accent color - or any other color you want --&gt;
          &lt;meta-data  android:name=&quot;com.dieam.reactnativepushnotification.notification_color&quot;
                      android:resource=&quot;@android:color/white&quot;/&gt;&lt;!-- &lt; Only if you're using GCM or localNotificationSchedule() &gt; --&gt;
          &lt;receiver
              android:name=&quot;com.google.android.gms.gcm.GcmReceiver&quot;
              android:exported=&quot;true&quot;
              android:permission=&quot;com.google.android.c2dm.permission.SEND&quot; &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;com.google.android.c2dm.intent.RECEIVE&quot; /&gt;
                  &lt;category android:name=&quot;com.hidroponik&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
          &lt;!-- &lt; Only if you're using GCM or localNotificationSchedule() &gt; --&gt;&lt;receiver android:name=&quot;com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher&quot; /&gt;
          &lt;receiver android:name=&quot;com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver&quot;&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;android.intent.action.BOOT_COMPLETED&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
          &lt;service android:name=&quot;com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService&quot;/&gt;&lt;!-- &lt; Only if you're using GCM or localNotificationSchedule() &gt; --&gt;
          &lt;service
              android:name=&quot;com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerServiceGcm&quot;
              android:exported=&quot;false&quot; &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;com.google.android.c2dm.intent.RECEIVE&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/service&gt;
          &lt;!-- &lt;/ Only if you're using GCM or localNotificationSchedule() &gt; --&gt;&lt;!-- &lt; Else &gt; --&gt;
          &lt;service
              android:name=&quot;com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService&quot;
              android:exported=&quot;false&quot; &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;com.google.firebase.MESSAGING_EVENT&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/service&gt;
  
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  <p>i am sorry for the long code please help me</p>