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

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.xdnf.cn/news/9563.html

相关文章:

  • 计算机网络 - 关于IP相关计算题
  • BugKu Web渗透之矛盾
  • Nodejs+http-server 使用 http-server 快速搭建本地图片访问服务
  • 计算机网络(4)——网络层
  • 使用LangChain与多模态模型实现图像中的文字和表格提取(PDF可转图片)
  • Android 插件化
  • 中企出海大会|打造全球化云计算一张网,云网络助力中企出海和AI创新
  • AudioTrack的理解
  • Mini-F5265-OB开发板——UART不定长接收
  • 内联盒模型基本概念?——前端面试中的隐形考点剖析
  • 前端EXCEL插件智表ZCELL数据源功能详解
  • LabVIEW 中内存释放相关问题
  • 2025年渗透测试面试题总结-匿名[校招]安全工程师(甲方)(题目+回答)
  • 第2讲、从启动到表单加载:Odoo 18 的完整执行流程详解
  • [科研实践] VS Code (Copilot) + Overleaf (使用 Overleaf Workshop 插件)
  • RabbitMQ仲裁队列高可用架构解析
  • Mac 版不能连接华为 GaussDB 吗?我看 Windows 版可以连接?
  • delphi12 sqlserver 客户-服务简单连接设置
  • GitLab CI流水线权限隔离
  • 数据结构-代码总结
  • Spring AI系列之使用 Mistral AI API 实现函数调用
  • MySQL 默认的隔离级别解析
  • AWS WebRTC:获取ICE服务地址(part 1)
  • Flask集成Selenium实现网页截图
  • SpringBoot+tabula+pdfbox解析pdf中的段落和表格数据
  • docker学习基本使用教程
  • Cursor:开启智能编程新视界
  • :inline=“true“会发生什么
  • 音视频解码基础知识
  • 从C++编程入手设计模式1——单例模式