Bug
Using the latest package from github, and after following all install instructions (having previous versions working perfectly), I get an error: package com.google.android.gms.location does not exist.
Build fails on line 17 of AirMapManager.java.
This was added in the recent commit “Improved user location on Android (#2993)”
Here is an extract from my app/build.gradle
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
Library version: next
Adding
implementation 'com.google.android.gms:play-services-location:16.0.0'
To the android-react-native-maps.gradle file removes the no definitions for me, but then introduces new errors around setUserLocationPriority, setUserLocationUpdateInterval and setUserLocationFastestInterval not being defined in AirMapManager.java
FIX
I fix this solution by removing bellow existing maps package from my node_modules folder
"react-native-maps": "git+https://git@github.com/react-native-community/react-native-maps.git"
and re-install it with this command
yarn add react-native-maps -E
ornpm install react-native-maps --save-exact
It didn’t work for me :/
So I have submitted a new PR fixing my previous PR 😉
It seems like some of the code in the PR somehow got lost in the merge process, like the dependency for play-service-location and several of my added methods to AirMapView.java. I do not know why, but now at least they are there in the new PR (3320), and they work as far as I can tell.