Flutter各版本对操作系统的支持情况

Flutter 3.3

32-bit iOS deprecation

As we announced earlier with the 3.0 stable release, due to decreased usage, that release was the last one to support 32-bit iOS devices and iOS versions 9 and 10. This change affects the iPhone 4S, iPhone 5, iPhone 5C, and the 2nd, 3d, and 4th generation iPad devices. The 3.3 stable version of Flutter and all following stable releases no longer support 32-bit iOS devices and iOS versions 9 and 10. This means that apps built against Flutter 3.3 and later won’t run on those devices.

Sunsetting macOS 10.11 and 10.12

In the Q4 2022 stable release, we expect to drop support for macOS versions 10.11 and 10.12. This means that apps built against stable Flutter SDKs after that point will no longer work on these versions, and the minimum macOS version supported by Flutter will increase to 10.13 High Sierra.

Bitcode deprecation

Bitcode will no longer be accepted for iOS app submission in the upcoming Xcode 14 release, and projects with bitcode enabled will emit a build warning in this version of Xcode. In light of this, Flutter will drop support for bitcode in a future stable release.

By default, Flutter apps don’t have bitcode enabled, and we don’t expect this to impact many developers. However, if you have enabled bitcode manually in your Xcode project, disable it as soon as you upgrade to Xcode 14. You can do so by opening ios/Runner.xcworkspace and setting the build setting Enable Bitcode to No. Add-to-app developers should disable it in the host Xcode project.

See Apple’s documentation to learn more about bitcode distribution.

Flutter 3.7

Supported platforms

As of the current release, Flutter supports the following platforms as part of Google-tested and best-effort platform tier:

Platform Version Channels
Android API 16 (Android 4.1) & above All
iOS iOS 11 & above All
Linux Debian, 64-bit All
macOS El Capitan (10.11) & above All
Web Chrome 84 & above All
Web Firefox 72.0 & above All
Web Safari on El Capitan & above All
Web Edge 1.2.0 & above All
Windows Windows 7 & above, 64-bit All

All channels include master, beta, and stable channels.

Google-tested platforms
Platform Version
Android Android SDK 19–30*
iOS 14-15
Linux Debian 10
Linux Ubuntu 18.04 LTS
macOS Monterey (12) & above
Web Chrome 84
Web Firefox 72.0
Web Safari / Catalina
Web Edge 1.2.0
Windows Windows 10

* Passing tests on Android SDK 19 also confers a passing result on SDK 20. This is because Android SDK 20 has additional support for Android Wear, but otherwise no new or deprecated API.

Best-effort platforms
Platform Version
Android Android SDK 16–18
iOS iOS 11-13
Linux Debian 11
Linux Debian 9 & below
Linux Ubuntu 20.04
Linux Ubuntu 22.04 (Aspirational Google-tested platform)
macOS El Capitan (10.11) - Big Sur (11)*
Windows Windows 11 (Aspirational Google-tested platform)
Windows Windows 8
Windows Windows 7

* Flutter 3.3 is the last stable release with macOS 10.11 through 10.13 best-effort support.

Unsupported platforms
Platform Version
Android Android SDK 15 & below
iOS iOS 10 & below and arm7v 32-bit iOS
Linux Any 32-bit platform
macOS Yosemite (10.10) & below
Windows Windows Vista & below
Windows Any 32-bit platform

Flutter 3.24.5

目标平台 目标架构 支持版本 CI 测试版本 不支持版本
Android SDK x64, Arm32, Arm64 21 至 34 21 至 34 20 和更早版本
iOS Arm64 12 至 18 17 11 和更早版本
macOS x64, Arm64 Mojave (10.14) 至 Sequoia (15) Ventura (13), Sonoma (14) High Sierra (10.13) 和更早版本
Windows x64, Arm64 10, 11 10 8 和更早版本
Debian (Linux) x64, Arm64 10, 11, 12 11, 12 9 和更早版本
Ubuntu (Linux) x64, Arm64 20.04 LTS 至 24.04 LTS 20.04 LTS, 22.04 LTS 23.10 和更早的非 LTS 版本
Chrome (Web) JavaScript, WebAssembly 最新的 2 个 119, 125 95 和更早版本
Firefox (Web) JavaScript 最新的 2 个 132 98 和更早版本
Safari (Web) JavaScript 15.6 和更新版本 15.6 15.5 和更早版本
Edge (Web) JavaScript, WebAssembly 最新的 2 个 119, 125 95 和更早版本

Flutter 3.27.0

目标平台 目标架构 支持版本 CI测试版本 不支持版本
Android SDK x64, Arm32, Arm64 21 to 34 21 to 34 20 and earlier
iOS Arm64 12 to 18 17 11 and earlier
macOS x64, Arm64 Mojave (10.14) to Sequoia (15) Ventura (13), Sonoma (14) High Sierra (10.13) and earlier
Windows x64, Arm64 10, 11 10 8 and earlier
Debian (Linux) x64, Arm64 10, 11, 12 11, 12 9 and earlier
Ubuntu (Linux) x64, Arm64 20.04 LTS to 24.04 LTS 20.04 LTS, 22.04 LTS 23.10 and earlier non-LTS
Chrome (Web) JavaScript, WebAssembly Latest 2 119, 125 95 and earlier
Firefox (Web) JavaScript Latest 2 132 98 and earlier
Safari (Web) JavaScript 15.6 and newer 15.6 15.5 and earlier
Edge (Web) JavaScript, WebAssembly Latest 2 119, 125 95 and earlier

参考链接


Flutter Web 调试问题: Assertion Failed on Text Input Click in Chrome (Flutter 3.27.0, Dart 3.6.0)

前置条件

  • Flutter 版本: 3.27.0 / 3.27.1
  • Dart 版本: 3.6.0
  • 编译器: Android Studio Ladybug | 2024.2.1 Patch 3
  • 操作系统: macOS Sequoia 15.2 (Apple M2) / Windows 11 专业版 23H2
  • 浏览器: Chrome (131.0.6778.205)

问题描述

直接从 Flutter API 官方页面(Form Class Documentation)复制 Form 示例,并使用 Flutter 的 Web 调试模式运行。

尝试用鼠标单击文本输入时,遇到以下错误:

这个问题是 Flutter 3.27.0 / 3.27.1 的缺陷,官方已经在 Flutter 3.28 版本修复,后续升级到 Flutter 3.28 即可解决此问题。

目前(2024/12/23master 通道已经修复这个问题,可以通过切换到 master 通道来解决:

参考链接


Could not find a command named "/data/Android/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot"

经过多次的 Flutter 版本升级,以前的老项目脚本在执行 flutter pub get 相关的命令时候报错如下:

解决方法为删除项目下的所有 pubspec.lock 文件即可。

参考链接


Flutter 错误:找不到名为 frontend_server.dart.snapshot 的命令

Caught error: Unsupported operation: Platform._operatingSystem

Flutter 代码运行在 Chrome 上的时候报错 “Caught error: Unsupported operation: Platform._operatingSystem”。

报错的原因是因为代码中使用了 Platform.isIOSPlatform.isAndroid 等函数判断系统类型,可惜的是,这些函数并不能在 Chrome 上运行。 

修改方法就是自己封装一个自定义工具类,先使用 kIsWeb 排除一下浏览器。参考如下:

参考链接


Flutter Web 警告 Local variable for "serviceWorkerVersion" is deprecated

升级到 Flutter 3.22.0 之后,在 Chrome 上运行 Flutter Web 应用程序时收到以下警告:

这个警告的原因是,新版本的 Flutter Web 应用加载 service_worker.js 的方式发生了变化,原来的加载脚本被 {{flutter_bootstrap_js}} 替代。

调整为新的初始化代码即可解决此问题。

原始的代码如下:

调整后的代码如下:

参考链接


Flutter error G5FE39F1E: Type 'UnmodifiableUint8ListView' not found

问题描述

原本在 macOS 开发的项目,现在 Windows 10 运行时报如下错误:

解决方法

参考链接


Flutter Error: Type ‘UnmodifiableUint8ListView‘ not found

Flutter调试 iOS 真机卡在启动页面,报错 “try setting IDEPreferLogStreaming=YES”

最近,Flutter 升级到最新版本之后,iOS 真机调试的时候持续卡住在启动页面。

Xcode 输出如下报错信息:

Flutter 系统信息如下:

继续阅读Flutter调试 iOS 真机卡在启动页面,报错 “try setting IDEPreferLogStreaming=YES”

make: *** No rule to make target `sqlite_cfg.h', needed by `.target_source'

前置条件

  • macOS Sonoma (14.4.1) 
  • MacBook Pro 2023-Apple M2 Pro (4能效核、8性能核、32GB内存、2TB磁盘)
  • Homebrew (4.2.18 或更高版本)
  • Xcode Version 15.3 (15E204a)
  • DevEco Studio NEXT Developer Preview2 4.1.3.700

错误信息

源代码编译 sqlite3

或者使用 pod 安装 sqlite3 报错:

观察源代码目录,也确实没有 sqlite_cfg.h 文件生成。

继续阅读make: *** No rule to make target `sqlite_cfg.h', needed by `.target_source'

Flutter: Xcode error “Unable to boot the Simulator“

使用 flutter、Android Studio ,通过iOS模拟器运行项目,一直一切正常。

某次重启后无法启动模拟器,报错信息如下:

解决方法,亲测有效:

macOS 14.4.1以及更高版本:
进入 “系统设置”→“通用”→“存储空间”→“开发者” 删除 “XCode 缓存” 。

在 macOS 13 及更高版本上:
进入 “系统设置”→“常规”→“存储”→“开发人员”
删除“开发者缓存”

在 macOS 12 及更低版本上:
转到“关于本机”→“存储”→“管理”→“开发人员”

参考链接


Flutter: XCode error “Unable to boot the Simulator

为容器添加基于BoxDecoration的labelText (作为TextField)

TextField 有一个很好的方法来在它的 BoxDecoration 装饰上放置一个文本标签,如下:

通过以下方式:

有没有办法在 Container 的其他 BoxDecoration 上实现同样的效果?例如,我想指定标签"XP":

但是 Flutter 没有为 BoxDecoration 提供 labelText (仅存在于 InputDecoration )。

我们可以使用 InputDecorator 作为父对象来完成上述需求,如下:

输出

参考链接