'.create method not working with LocationRequest();

private LocationRequest mlocationrequest; // initialziation

mlocationrequest= LocationRequest.create(); // here causing error

screenshot



Solution 1:[1]

For me, it was because I used the wrong import.

Try using the right one:

import com.google.android.gms.location.LocationRequest;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MWiesner