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

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web3

Stack trace

  • 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.<init>(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) ... 10 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

We couldn't find other users who have seen this exception.