cannot resolve symbol 'LocationServices'

You need to import:


And in build.gradle:

implementation ''

you class must implement:

public class MapsActivity extends FragmentActivity implements OnMapReadyCallback,
    GoogleApiClient.OnConnectionFailedListener { ...}

You need to OverWrite this methods:

    public void onConnected(Bundle bundle) {


    public void onConnectionSuspended(int i) {


    public void onConnectionFailed(ConnectionResult connectionResult) {


    public void onLocationChanged(Location location) {


Here is a detail Implementation

Looking at this 7 months after it was posted and got me out of a jam.

At the moment of writing, you have to update the build.gradle(Module: app) to compile ''

Your post helped me a lot and I hope this addition also helps others looking at this post in the future.