flutter 混合开发实现热更新
flutter混合开发后,在Xcode中运行工程,由于flutter项目没有运行起来,是没办法热更新的,但是这种场景是可以解决的
- Flutter和原生(这里只说iOS 参考https://www.cnblogs.com/qqcc1388/p/12693991.html)混合开发配置
- Xcode中运行App
- Flutter工程中(我这里是VSCode中)执行命令行
chenhaodeMac:flutter_project chenhao$ flutter attach Syncing files to device iPhone 11 Pro Max... 6,854ms (!) ?? To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R". An Observatory debugger and profiler on iPhone 11 Pro Max is available at: http://127.0.0.1:64758/Ohwd6eZv1eY=/ For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
执行完flutter attack你会发现,命令行熟悉的页面出现了,此时试试看,在VSCode中做Flutter页面的修改,会直接修改模拟器中的页面
注意 需要先让native代码运行起来,在执行flutter attach
相关推荐
csdnYF 2020-11-15
SemiraChen 2020-10-10
YejiaSun 2020-09-27
csdnYF 2020-09-20
FrankAbagnale 2020-09-15
wmd看海 2020-07-27
szintu 2020-07-05
chaoxiao 2020-07-04
wmd看海 2020-06-27
龙衣 2020-06-26
龙衣 2020-06-09
龙衣 2020-06-08
wmd看海 2020-06-04
Samlss 2020-06-04
wmd看海 2020-06-04
csdnYF 2020-05-30
androidgjw 2020-05-28
wmd看海 2020-05-28
wmd看海 2020-05-19