Firebase Android - Skipping initialization

拟墨画扇 提交于 2020-01-26 04:09:06

问题


I am currently implementing an Android app, which uses Firebase Cloud Messaging. I've implemented everything according to the tutorial on the Firebase page.

However, whenever I try to run my app it seems like the Firebase initialization fails. Both, on an emulator and on a real device I get this debug message:

D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
W/InstanceID/Rpc: Found 10010
D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.

It doesn't call the InstanceIDListener. And it strangely worked with the emulator once.


回答1:


You have to add the following to your android manifest:

<service android:name=".MyFirebaseInstanceIDService">
    <intent-filter>
        <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
    </intent-filter>
</service>



回答2:


I'm not sure, but I guess you missed:

FirebaseApp.initializeApp(getApplicationContext());

https://firebase.google.com/docs/reference/android/com/google/firebase/FirebaseApp



来源:https://stackoverflow.com/questions/40754358/firebase-android-skipping-initialization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!