FIrebase Cloud Messaging, cannot resolve dependenc

2019-03-02 20:22发布

问题:

I was trying to write an application using Firebase Cloud Messaging as per the guidelines given here, but I'm struck in adding the dependency for implementing FCM (com.google.firebase:firebase-core:9.0.2). Every time I try to add it via project structure, it won't list the dependency in the search results. When I try to add it in app level gradle, it gives me an error that the dependency cannot be resolved. I don't know where I'm going wrong but please help me out with this.

回答1:

Download updates from your SDK manager. I had the same issue. Updating Google play services and Google Repository from the SDK manager worked for me.