pavel-corsaghin / react-native-leaflet

A LeafletView component using WebView and Leaflet map for React Native applications
MIT License
99 stars 42 forks source link

net::ERR_FILE_NOT_FOUND #45

Open DanNielerl opened 3 weeks ago

DanNielerl commented 3 weeks ago

I got the following error log message: Encountered an error loading page {"canGoBack": false, "canGoForward": false, "code": -1, "description": "net::ERR_FILE_NOT_FOUND", "loading": false, "target": 59, "title": "", "url": "file:///android_asset/leaflet.html"} I was working with "expo": "~51.0.12", "react": "18.2.0", npm version 10.8.1 and testing on android.

I changed in the code library "{ uri: 'file:///android_asset/leaflet.html' }" by "require('../../android/src/main/assets/leaflet.html')" And that worked, but that's not a good practice, Is there another option?