java – NullPointerException error on an Android-GeoFire project

This is the error I’m getting: java.lang. Attempt to call the virtual method ‘double android.location.Location.getLatitude()’ on a null object reference results in a NullPointerException.Can anyone guide me on how to achieve this? public class MapsActivity extends FragmentActivity implements OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks , GoogleApiClient.OnConnectionFailedListener, LocationListener { private GoogleMap mMap; private ActivityMapsBinding binding; private static final int MY_PERMISSION_REQUEST_CODE … Read more