Flutter: 无法加载flutter_map的资源

huangapple go评论65阅读模式
英文:

Flutter: Unable to load assets for flutter_map

问题

I'm building an app where I embed a map using flutter_map.
我正在构建一个应用程序,在其中嵌入了一个使用flutter_map的地图。

I have downloaded offline tiles, but they cannot be loaded from the assets folder because the following error appears: Error.
我已经下载了离线瓦片,但它们无法从资产文件夹加载,因为出现了以下错误:错误

flutter_map itself gives the following errors: Error.
flutter_map本身出现了以下错误:错误

My main.dart file: Main Dart File.
我的main.dart文件:主要Dart文件

My pubspec.yaml file: Pubspec.yaml.
我的pubspec.yaml文件:Pubspec.yaml

My folder structure:
我的文件夹结构:

Flutter: 无法加载flutter_map的资源

英文:

I'm building an app where I embed a map using flutter_map.
I have downloaded offline tiles, but they cannot be loaded from the assets folder because the following error appears: Error.
flutter_map itself gives the following errors: Error

My main.dart file: Main Dart File

My pubspec.yaml file: Pubspec.yaml

My folder structure:

Flutter: 无法加载flutter_map的资源

答案1

得分: 0

找到了一个,不太好但功能正常的解决方案:
我已经分别添加了每个子文件夹。

英文:

Found a, unfortunately not so great, but functional solution:
I have added each subfolder individually.

huangapple
  • 本文由 发表于 2023年4月17日 00:53:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76029128.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定