当前位置: 首页 > article >正文

flutter使用html_editor_enhanced: ^2.6.0后,编辑框无法获取焦点,无法操作

flutter使用html_editor_enhanced: ^2.6.0后,编辑框无法获取焦点,无法操作,报如下错误:

PlatformException(error, Unknown feature SUPPRESS_ERROR_PAGE, null, java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE
I/flutter (26600): 	at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
I/flutter (26600): 	at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
I/flutter (26600): 	at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)
I/flutter (26600): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView.prepare(InAppWebView.java:436)
I/flutter (26600): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.FlutterWebView.<init>(FlutterWebView.java:82)
I/flutter (26600): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.FlutterWebViewFactory.create(FlutterWebViewFactory.java:67)
I/flutter (26600): 	at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:527)
I/flutter (26600): 	at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsCo
Exception: HTML editor is still loading, please wait before evaluating this JS: $('#summernote-2').summernote('code', '');!
I/flutter (31854): [2025-05-27 17:54:49.996853 | Catcher 2 | INFO] 
I/flutter (31854): [2025-05-27 17:54:49.997095 | Catcher 2 | INFO] ------- STACK TRACE -------
I/flutter (31854): [2025-05-27 17:54:49.997442 | Catcher 2 | INFO] #0      HtmlEditorController._evaluateJavascript (package:html_editor_enhanced/src/html_editor_controller_mobile.dart:261:9)
I/flutter (31854): [2025-05-27 17:54:49.997599 | Catcher 2 | INFO] #1      HtmlEditorController.setText (package:html_editor_enhanced/src/html_editor_controller_mobile.dart:85:5)

错误原因:
html_editor_enhanced中使用的flutter_inappwebview 插件内部调用了 AndroidX WebView 的 SUPPRESS_ERROR_PAGE 特性检测,但你的设备/系统版本的 WebView 不支持这个新特性,导致异常抛出

解决办法:
降低webview_flutter插件的版本
使用如下版本:

webview_flutter: ^3.0.0
http://www.lryc.cn/news/2395363.html

相关文章:

  • FPGA纯verilog实现MIPI-DSI视频编码输出,提供工程源码和技术支持
  • 手写字魔法消除3:深度学习PmrNet神经网络实现图片修复(含训练代码、数据集和GUI交互界面)
  • 大数据运维过程中常见的一些操作
  • opencv使用经典bug
  • 劫持进程注入
  • 计算机基础——宏病毒防御与网络技术
  • 深度解析互联网区(Internet ):架构、风险与防护全攻略
  • 2024Flutter面试题
  • C++内存学习
  • Python uv包管理工具使用详解
  • [Linux] Linux 系统从启动到驱动加载
  • 基于微信小程序的云校园信息服务平台设计与实现(源码+定制+开发)云端校园服务系统开发 面向师生的校园事务小程序设计与实现 融合微信生态的智慧校园管理系统开发
  • 大语言模型的技术原理与应用前景:从Transformer到ChatGPT
  • 如何编写GitLab-CI配置文件
  • 生成式人工智能:重构软件开发的范式革命与未来生态
  • 关于 java:4. 异常处理与调试
  • Java基础 Day26
  • android lifeCycleOwner生命周期
  • 高防IP能抗住500G攻击吗?
  • 工作流引擎-10-什么是 BPM?
  • day1-小白学习JAVA---JDK安装和环境变量配置(mac版)
  • 每日温度(力扣-739)
  • QT中子线程触发主线程弹窗并阻塞等待用户响应-传统信号槽实现
  • HarmonyOS鸿蒙系统深度运维指南
  • SpringBoot多租户系统的5种架构设计方案
  • 数据分析实战1(Excel制作报表)
  • 本地部署大模型llm+RAG向量检索问答系统 deepseek chatgpt
  • 设备健康管理的战略升维:用预测性维护重构企业竞争力
  • Redis事务详解:原理、使用与注意事项
  • 提升 GitHub Stats 的 6 个关键策略