Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Default FirebaseApp is not initialized in this process #1

Open
marazmone opened this issue Aug 19, 2021 · 1 comment
Open

Default FirebaseApp is not initialized in this process #1

marazmone opened this issue Aug 19, 2021 · 1 comment

Comments

@marazmone
Copy link

marazmone commented Aug 19, 2021

При попытке запуска проекта получаю ошибку

2021-08-19 14:39:49.680 13167-13167/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: dev.androidbroadcast.ums, PID: 13167
    java.lang.RuntimeException: Unable to create application dev.androidbroadcast.ums.UmsSampleApp: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process dev.androidbroadcast.ums. Make sure to call FirebaseApp.initializeApp(Context) first.
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
        at android.app.ActivityThread.access$1300(ActivityThread.java:237)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process dev.androidbroadcast.ums. Make sure to call FirebaseApp.initializeApp(Context) first.
        at com.google.firebase.FirebaseApp.getInstance(FirebaseApp.java:183)
        at com.google.firebase.messaging.FirebaseMessaging.getInstance(com.google.firebase:firebase-messaging@@22.0.0:1)
        at dev.androidbroadcast.ums.push.gms.FirebaseMessagingService.<init>(FirebaseMessagingService.kt:14)
        at dev.androidbroadcast.ums.push.gms.FirebaseMessagingServiceFactory.create(FirebaseMessagingServiceFactory.kt:18)
        at dev.androidbroadcast.ums.push.UmsMessagingManager$Companion.initWithDefault(UmsMessagingManager.kt:145)
        at dev.androidbroadcast.ums.push.UmsMessagingManager$Companion.initWithDefault$default(UmsMessagingManager.kt:132)
        at dev.androidbroadcast.ums.di.MobileServiceModule.providePushManager(MobileServiceModule.kt:18)
        at dev.androidbroadcast.ums.di.MobileServiceModule_ProvidePushManagerFactory.providePushManager(MobileServiceModule_ProvidePushManagerFactory.java:39)
        at dev.androidbroadcast.ums.di.MobileServiceModule_ProvidePushManagerFactory.get(MobileServiceModule_ProvidePushManagerFactory.java:29)
        at dev.androidbroadcast.ums.di.MobileServiceModule_ProvidePushManagerFactory.get(MobileServiceModule_ProvidePushManagerFactory.java:11)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at dev.androidbroadcast.ums.di.DaggerAppComponent.getUmsMessagingManager(DaggerAppComponent.java:58)
        at dev.androidbroadcast.ums.UmsSampleApp.onCreate(UmsSampleApp.kt:28)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
        at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:223) 
        at android.app.ActivityThread.main(ActivityThread.java:7656) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
@a-reznic
Copy link

a-reznic commented Jan 8, 2024

видимо нужно свой sample/src/google-services.json вставить

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants