0

I was debugging my Android Studio project and I found where it crashes:

try {
            if (mLocationPermissionGranted) {
                Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation(); // HERE!

// so the code below is not executed

                locationResult.addOnCompleteListener(this, new OnCompleteListener<Location>() {
...
...

The message on the Debug Terminal is "mFusedLocationProviderClient = null" Where am I going wrong?

Thank you all.

0 Answers0