Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

405
Visualizações
firebase.initializeApp() vs FirebaseApp.initializeApp()

I currently trying to set up push notifications using the Notifications package from 'expo-notifications', Im just getting the following error and I cant work around it:

[Error: Encountered an exception while calling native method: Exception occurred while executing exported method getDevicePushTokenAsync on module ExpoPushTokenManager: Default FirebaseApp is not initialized in this process com.-----.-----. Make sure to call FirebaseApp.initializeApp(Context) first.]

The thing is, this message is completely enraging me because I do call:

import * as firebase from "firebase";

and after that:

firebase.initializeApp(ApiKeys);

at the start of my app.

Do I now need to install the Firebase/App package so I can do FirebaseApp.initializeApp()? Do I need to initialize my app 2 times then?

Neither the docs from expo are mentioning such an error, nor I found anything related to this error in the firebase docs and Im really struggling with this one.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Aperently there is an import into the app/build.gradle file which is not mentioned inside the expo docs at all. Its the following line which is missing:

implementation("com.google.firebase:firebase-iid")

you need to put it inside your app/build.gradle file to make it work.

I found it in the following forum, the posts are just one month old so its a quite new bug.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda