Closed dnlsilva closed 5 years ago
Something similar occurs when importing the module: import MapView from 'react-native-open-street-maps'
react-native-open-street-map - Does not work.
When looking in the folder node_modules, it is possible to see that there are two installations. The one that contains the S and the one that does not contain S.
the error was in documentation of installation, thanks @GleidsonDaniel for report
in this case you need remove react-native-open-street-maps
and use the react-native-open-street-map
to import
In the part where it talks about the configuration of the setting.gradle, the import is wrong. It is currently described in this way:
include ':react-native-open-street-map' project(':react-native-open-street-map').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-open-street-map/lib/android')
But only imports the project correctly like this:
include ':react-native-open-street-map' project(':react-native-open-street-map').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-open-street-maps/lib/android')
It is necessary to place an s at the end of the "map".