after opening android studio, open settings and the go to plugins,then do following steps
- disable the firebase services
- enable the android support plugin
- restart android studio
- go to settings and then to plugins
- enable firebase services plugin
- restart android studio