当前位置:网站首页>flutter 问题总结
flutter 问题总结
2022-07-02 09:38:00 【如此简单000】
目录
方式一:Flutter/packages/flutter_tools/lib/src/web/chrome.dart中添加 ‘--disable-web-security’
run:
flutter run --no-sound-null-safety
build:
flutter build apk --no-sound-null-safety
2.使用了webview_flutter后flutter run出现问题:warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET'
is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project 'Pods')
在flutter项目的ios目录下找到Podfile文件,在底部替换post_install.....的内容为
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
end
然后cd到ios目录下,执行Pod install,然后出现提示信息
[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
解决第一个!问题。打开PodFile,释放注释platform :ios, '9.0'
解决第二个!问题。打开Flutter/Release.xcconfig ,添加
#include "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
然后再次运行pod install
之后还是出错,然后发现dart SDK版本号太低了,我的升级方式最终是下载新版本的flutter替换老版本文件夹。3.本地运行跨越
方式一:Flutter/packages/flutter_tools/lib/src/web/chrome.dart中添加 ‘--disable-web-security’
'--disable-web-security',
if (headless)
...<String>[
'--headless',
'--disable-gpu',
'--no-sandbox',
'--window-size=2400,1800',
],
然后删除flutter\bin\cache下的flutter_tools.snapshot文件和flutter_tools.stamp文件。
然后运行flutter doctor,然后重启项目
方式二:
flutter run --no-sound-null-safety -d chrome --web-renderer html边栏推荐
- MTK full dump抓取
- PLC-Recorder快速监控多个PLC位的技巧
- 在网上开股票账户安全吗?我是新手,还请指导
- Implementation of six singleton modes
- Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'
- 亚马逊云科技 Community Builder 申请窗口开启
- tqdm的多行显示与单行显示
- 每月1号开始计算当月工作日
- [cloud native] 2.5 kubernetes core practice (Part 2)
- What are the software product management systems? Inventory of 12 best product management tools
猜你喜欢

Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'

2022年4月17日五心红娘团队收获双份喜报

mysql链表数据存储查询排序问题

PHP tea sales and shopping online store

C#多维数组的属性获取方法及操作注意

Huawei game failed to initialize init with error code 907135000

Importerror: impossible d'importer le nom « graph» de « graphviz»

亚马逊云科技 Community Builder 申请窗口开启

TIPC messaging3
![[cloud native] 2.5 kubernetes core practice (Part 2)](/img/87/826894d758392a0c7a60dd5fa09eef.png)
[cloud native] 2.5 kubernetes core practice (Part 2)
随机推荐
Is the stock account given by qiniu business school safe? Can I open an account?
Native method merge word
TIPC messaging3
TIPC协议
ren域名有价值吗?值不值得投资?ren域名的应用范围有哪些?
Supermarket (heap overload
【云原生】2.5 Kubernetes 核心实战(下)
STM32单片机编程学习
TIPC Service and Topology Tracking4
Basic usage of MySQL in centos8
I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
ctf 记录
在连接mysql数据库的时候一直报错
Skills of PLC recorder in quickly monitoring multiple PLC bits
PKG package manager usage instance in FreeBSD
CentOS8之mysql基本用法
从ros1到ros2配置的一些东西
PHP tea sales and shopping online store
Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
Win11 arm system configuration Net core environment variable