title: FirebaseInitProvider crash when trying to run app
body: <p>I implemented the new FCM on the app following the steps on the FCM web.</p>
  
  <p>Now, I'm trying to run the app, but when I try it, the app crash with this error:</p>
  
  <pre><code>05-30 12:28:45.788 3002-3002/es.in2.otr.app.im E/AndroidRuntime: FATAL EXCEPTION: main
                                                                   Process: es.in2.otr.app.im, PID: 3002
                                                                   java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.res.Resources.getResourcePackageName(int)' on a null object reference
                                                                       at android.app.ActivityThread.installProvider(ActivityThread.java:6765)
                                                                       at android.app.ActivityThread.installContentProviders(ActivityThread.java:6357)
                                                                       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6297)
                                                                       at android.app.ActivityThread.access$1800(ActivityThread.java:221)
                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1860)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                       at android.os.Looper.loop(Looper.java:158)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:7224)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
                                                                    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.res.Resources.getResourcePackageName(int)' on a null object reference
                                                                       at com.google.android.gms.common.internal.zzah.&lt;init&gt;(Unknown Source)
                                                                       at com.google.firebase.FirebaseOptions.fromResource(Unknown Source)
                                                                       at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
                                                                       at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
                                                                       at android.content.ContentProvider.attachInfo(ContentProvider.java:1789)
                                                                       at android.content.ContentProvider.attachInfo(ContentProvider.java:1764)
                                                                       at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
                                                                       at android.app.ActivityThread.installProvider(ActivityThread.java:6762)
                                                                       at android.app.ActivityThread.installContentProviders(ActivityThread.java:6357) 
                                                                       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6297) 
                                                                       at android.app.ActivityThread.access$1800(ActivityThread.java:221) 
                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1860) 
                                                                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                       at android.os.Looper.loop(Looper.java:158) 
                                                                       at android.app.ActivityThread.main(ActivityThread.java:7224) 
                                                                       at java.lang.reflect.Method.invoke(Native Method) 
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
  </code></pre>
  
  <p>As I can see, thre method is trying to get some value, where is null.</p>
  
  <p>I searched for solutions, and found this post in SO. --> <a href="https://stackoverflow.com/questions/37312103/unable-to-get-provider-com-google-firebase-provider-firebaseinitprovider">Unable to get provider com.google.firebase.provider.FirebaseInitProvider</a></p>
  
  <p>As solution they said to add the applicationId to the gradle build project file, but I got it:</p>
  
  <pre><code>defaultConfig {
          applicationId "es.in2.otr.app.im"
          minSdkVersion 16
          targetSdkVersion 23
          multiDexEnabled true
  
          testApplicationId "es.in2.otr.app.im.test"
          testInstrumentationRunner "android.test.InstrumentationTestRunner"
      }
  </code></pre>
  
  <p>And stills  crashing.</p>
  
  <p>Is there some workaorund or solution to this problem?</p>