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?
- not question's duplicate: Google Play Services are already on the latest version
Add this line to your build file dependencies:
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
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:and click on sync now. Problem solved.