英文:
`TargetPLatform.macOS is not yet supported by the maps plugin`, but I'm building it for a web display
问题
我有一个使用 google_maps_flutter
和 google_maps_flutter_web
的Flutter Web应用,在我的本地机器上运行良好。当我尝试构建它以部署到Web服务器时,我收到错误消息 TargetPLatform.macOS is not yet supported by the maps plugin
,地图应该显示在那里。在VSCode的launch.json
文件中,用于工作的命令是:
{
"name": "my_app",
"request": "launch",
"type": "dart",
"args":[
"--dart-define", "BASE_URL=https://~~~~~~",
"--web-port", "5050",
"--web-renderer", "html"
]
}
我用于构建部署应用程序的命令是:
flutter build web \
--dart-define=BASE_URL="$base-url" \
--web-renderer=html
我是在Mac上构建网站。
英文:
I've got a flutter web app using google_maps_flutter
and google_maps_flutter_web
and it works fine on my local machine. When I attempt to build it for deploy to the web server, I get the error TargetPLatform.macOS is not yet supported by the maps plugin
where a map is supposed to display. The command in launch.json
for vscode (that works) is:
{
"name": "my_app",
"request": "launch",
"type": "dart",
"args":[
"--dart-define", "BASE_URL=https://~~~~~~",
"--web-port", "5050",
"--web-renderer", "html"
]
},
The command I use for building the app for deploy is:
flutter build web \
--dart-define=BASE_URL="$base-url" \
--web-renderer=html
I am building the website on a Mac.
答案1
得分: 1
我使用了这个命令,它有效果了!
英文:
flutter build web --profile --web-renderer=html
I used this command and it worked!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论