title: How to fix [Unhandled promise rejection: Error: Location provider is unavailable. Make sure that location services are enabled.]
body: <p>I have just upgraded my app from Expo SDK 37.0.0 to 38.0.0. The app works fine on iOS but on Android I get the following warning and the app doesn't geolocate me on the map.</p>
  <p>Development environment :</p>
  <ul>
  <li>Expo SDK 38.0.0 (managed workflow)</li>
  <li>React Native 0.62</li>
  <li>Maps provider : Google Maps on Android</li>
  <li>react-native-maps: 0.27.1</li>
  <li>React: 16.11.0</li>
  <li>Device : Honor 8X/Android 10</li>
  </ul>
  <p>Expected result : The app should geolocate me (the user) based on my position.
  Actual result : The app doesn't geolocate me (the user) based on my position.
  Warning :</p>
  <blockquote>
  <p>[Unhandled promise rejection: Error: Location provider is unavailable.
  Make sure that location services are enabled.]</p>
  </blockquote>
  <p>What have I tried so far?</p>
  <ol>
  <li><p>Ran expo upgrade once more to ensure that all of your packages are set to the correct version.</p>
  </li>
  <li><p>Deleted package-lock.json and node_modules and ran npm install.</p>
  </li>
  <li><p>Set Location.getCurrentPositionAsync({accuracy:Location.Accuracy.High})</p>
  </li>
  <li><p>Set Location.getCurrentPositionAsync({ enableHighAccuracy: true })</p>
  <pre><code>import * as Location from 'expo-location';
  import * as Permissions from 'expo-permissions';
  
  
  async _getLocationAsync() {
    let { status } = await Permissions.askAsync(Permissions.LOCATION);
    if (status !== 'granted') {
      /* If user hasn't granted permission to geolocate himself herself */
      Alert.alert(
        &quot;User location not detected&quot;,
        &quot;You haven't granted permission to detect your location.&quot;,
        [{ text: 'OK', onPress: () =&gt; console.log('OK Pressed') }]
      );
    }
  
    let location = await Location.getCurrentPositionAsync({ accuracy: Location.Accuracy.High });
    this.setState({
      userLat: location.coords.latitude,
      userLng: location.coords.longitude,
      navGeoStatus: true,
      lat: location.coords.latitude,
      lng: location.coords.longitude
    });
  }```
  </code></pre>
  </li>
  </ol>