Cannot read property 'StyleURL' of undefined
See original GitHub issueDescribe the bug
After following the installation instructions, as soon as I load the app I get the following error: Cannot read property 'StyleURL' of undefined
. It’s caused by the following line during initialization: https://github.com/react-native-mapbox-gl/maps/blob/master/javascript/components/MapView.js#L23. It appears the NativeModule MGLModule
is not loaded despite the fact that I added RCTMGLPackage
to the packages list in MainApplication.java
(and other gradle files).
To Reproduce
Install, import maps
, run the app with Expo.
Expected behavior App loads without crashing.
Screenshots
Versions
- Platfrom: Android
- Device: Xiomi Redmi 6
- OS: Android 8.1.0
- SDK Version: 28
- React Native Version: 0.59.10
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Cannot read property 'StyleURL' of undefined #386 - GitHub
After following the installation instructions, as soon as I load the app I get the following error: Cannot read property 'StyleURL' of undefined...
Read more >Cannot read property 'StyleURL' of undefined - Bountysource
After following the installation instructions, as soon as I load the app I get the following error: Cannot read property 'StyleURL' of undefined...
Read more >Mapbox React Native can't access the map's methods
I wasn't defining a ref property on the MapView. It should have had a reference defined as this. ... _map = c} styleURL={Mapbox.StyleURL....
Read more >Cannot read properties of undefined (reading 'title') 2 - Angular
Dear Mr. Jason & everyone I am getting this error the add new-product page is not working I appreciate any help, I am...
Read more >rnmapbox/Lobby - Gitter
I keep getting the error undefined cannot read property usertrackingModes of ... that The Project with path mapbox/react-native-mapboxgl could not be found.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it is kinda: https://github.com/react-native-mapbox-gl/maps#expo-support
Where does it say we can’t run in expo?