- Check internet connection of mobile and pc.
- Have you upgraded your play services app in mobile recently? check. If you have upgraded your play services app and you are using old depencies in project. This may be one of the reason of firebase intialization unsuccessfull. If you have upgraded app then you should upgrade dependecies as well. check these links https://firebase.google.com/docs/android/setup#available_libraries and https://developers.google.com/android/guides/setup
- check the json file of project which you got while creating firebase project in google console. compare the latest with the file you have in project.
- follow the prerequisites in the above links (second point)
- Download new update of Google Play services sdk from the Google Repository from sdk manager.
- finally check out these dependencies whether you have these in gradle file
- compile 'com.google.firebase:firebase-messaging:10.0.1'
- compile 'com.google.firebase:firebase-auth:10.0.1'
- compile 'com.firebase:firebase-client-android:2.5.2+'
- compile 'com.google.firebase:firebase-core:10.0.1'
- compile 'com.google.android.gms:play-services:10.0.1'
- compile 'com.google.android.gms:play-services-auth:10.0.1'
at the time i writing this blog ,latest dependencies are 10 , you should add updated one.
* There may be other Reasons also for this issue but i tried to have cover most of it.
THANK YOU
No comments:
Post a Comment