You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter 3.13.0升级后Impeller渲染报错崩溃,求解决方法

解决Flutter 3.13.0升级后Impeller导致启动崩溃问题

以下是针对问题的具体解决步骤:

  • 检查info.plist配置有效性
    确认FLTEnableImpeller配置位于<dict>根节点下,无XML语法错误,拼写完全正确(注意大小写)。建议用Xcode打开info.plist以可视化方式编辑,避免手动编写XML时出错。

  • 清理构建缓存与依赖
    执行以下命令清理项目缓存:

    flutter clean
    

    进入iOS目录,删除Pods文件夹和Podfile.lock,然后重新安装依赖:

    cd ios
    rm -rf Pods Podfile.lock
    pod install
    

    最后重启Xcode并清理Xcode构建缓存(快捷键Cmd+Shift+K)。

  • 通过代码强制禁用Impeller
    若info.plist配置无效,可在iOS原生代码中强制指定Skia渲染后端:

    • 若是Swift版AppDelegate.swift:
      import Flutter
      import UIKit
      
      @UIApplicationMain
      class AppDelegate: FlutterAppDelegate {
        override func application(
          _ application: UIApplication,
          didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
        ) -> Bool {
          // 强制禁用Impeller
          FlutterViewController.setImpellerEnabled(false)
          GeneratedPluginRegistrant.register(with: self)
          return super.application(application, didFinishLaunchingWithOptions: launchOptions)
        }
      }
      
    • 若是Objective-C版AppDelegate.m:
      #import "AppDelegate.h"
      #import "GeneratedPluginRegistrant.h"
      
      @implementation AppDelegate
      
      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        [FlutterViewController setImpellerEnabled:NO];
        [GeneratedPluginRegistrant registerWithRegistry:self];
        return [super application:application didFinishLaunchingWithOptions:launchOptions];
      }
      
      @end
      
  • 排查依赖兼容性
    运行flutter pub outdated检查第三方插件版本,将所有依赖更新至支持Flutter 3.13的版本,重点关注涉及图形渲染、原生交互的插件,这类插件最容易因Impeller引入兼容性问题。

  • 验证设备系统版本
    Flutter 3.13的Impeller最低支持iOS 13,若测试设备为iOS 12及以下版本,需确保设备系统版本符合要求,同时在旧设备上优先使用Skia渲染。

内容的提问来源于stack exchange,提问作者Farid Ahmadov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.12 10:35:17