fleaflet / flutter_map

A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.
https://pub.dev/packages/flutter_map
BSD 3-Clause "New" or "Revised" License
2.75k stars 860 forks source link

"Failed host lookup: 'a.tile.openstreetmap.org'" when run in --release #690

Closed TheLastGimbus closed 4 years ago

TheLastGimbus commented 4 years ago

When I use this lib with OpenStreetMap normally, in debug, it works fine. When i use it in release mode, suddently I can't reach OSM address: I/flutter ( 3092): SocketException: Failed host lookup: 'c.tile.openstreetmap.org' (OS Error: No address associated with hostname, errno = 7)

joaotomaspinheiro commented 4 years ago

It does the same for me. When I run in debug mode, it works perfectly. But in release mode, the map appears blank, with that same exception.

ibrierley commented 4 years ago

You need to check your androidmanifest XML file in the release folder. You will prob find you don't have internet enabled there. Compare it to the debug folder. (Sorry on mobile so can't dig out exact text to add in)

On Saturday, July 18, 2020, joaotomaspinheiro notifications@github.com wrote:

It does the same for me. When I run in debug mode, it works perfectly. But in release mode, the map appears blank, with than same exception.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fleaflet/flutter_map/issues/690#issuecomment-660388761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YN5OUHKY2AZ6UNNFJHLLR4DSC7ANCNFSM4O6RMCEA .

TheLastGimbus commented 4 years ago

Thanks, this worked :ok_hand: Shouldn't this be already declared by the package itself? (Or not, if someone wants to use only offline version and not have internet permission) ?