当前位置:网站首页>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
边栏推荐
- JS——每次调用从数组里面随机取一个数,且不能与上一次为同一个
- Openmldb meetup No.4 meeting minutes
- RPA advanced (II) uipath application practice
- 三.芯片啟動和時鐘系統
- PHP tea sales and shopping online store
- Implementation of six singleton modes
- Gaode draws lines according to the track
- liftOver进行基因组坐标转换
- Functional interfaces and method references
- Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic
猜你喜欢
Multi line display and single line display of tqdm
RPA advanced (II) uipath application practice
三.芯片啟動和時鐘系統
Win11 arm system configuration Net core environment variable
MTK full dump抓取
PowerBI中导出数据方法汇总
TIPC Service and Topology Tracking4
mysql链表数据存储查询排序问题
TIPC Cluster5
ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
随机推荐
STM32 single chip microcomputer programming learning
三.芯片啟動和時鐘系統
Gaode draws lines according to the track
SSRF
Internship report skywalking distributed link tracking?
Verilog and VHDL signed and unsigned number correlation operations
Supermarket (heap overload
Eight sorting summaries
Resources reads 2D texture and converts it to PNG format
Redis超出最大内存错误OOM command not allowed when used memory &gt; 'maxmemory'
On April 17, 2022, the five heart matchmaker team received double good news
[in simple terms, play with FPGA learning 3 ----- basic grammar]
C# 文件与文件夹操作
ROS lacks xacro package
Some suggestions for young people who are about to enter the workplace in the graduation season
Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'
mmrotate旋转目标检测框架使用记录
Summary of data export methods in powerbi
由粒子加速器产生的反中子形成的白洞
tqdm的多行显示与单行显示