Android class 'GeofencingClient' doesn't exist?

SimpleJ :

I'm attempting to follow the Android geofencing guide, but I immedietely get stuck when I try to declare a GeofencingClient variable:

Cannot resolve symbol GeofencingClient

Normally I would be able to just press Alt+Enter and select "Import class", but this option isn't available here:

No import class option

Does the GeofencingClient class exist anymore? Do I need to install some third party library?

Bö macht Blau :

GeofencingClient is part of Google Play Services. You need to add the following dependency to the build.gradle file of the module, then you will be able to import the class in your code:

dependencies {
    // ...
    implementation com.google.android.gms:play-services-location:16.0.0
}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=114523&siteId=1