Declaring dependencies as
compile 'com.google.firebase:firebase-messaging:9.4.0' I get "can not resolve symbol GoogleApiAvailability" message in the activity's import row
import com.google.android.gms.common.GoogleApiAvailability; What is wrong?
Add this line to your build file dependencies:
compile 'com.google.android.gms:play-services-base:9.4.0' play-services-base is the Play Services base client library and is listed in the Play Services Setup Guide.
I faced same problem but in my case problem solved by just changing the position of apply plugin: 'com.google.gms.google-services' in the build.gradle(Module: app) file.
Line
apply plugin: 'com.google.gms.google-services' was written at the last in the gradle file. Remove this from here and add it to the top, below the line apply plugin: 'com.android.application' Like this:
apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' and click on sync now. Problem solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With