首页 > 解决方案 > 颤振:错误:非抽象类'RenderParagraphX'缺少这些成员的实现,由sliding_up_panel-1.0.2引起

问题描述

由于我昨天更新了颤振,我收到以下错误消息:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                           23,5s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    ../../.pub-cache/hosted/pub.dartlang.org/assorted_layout_widgets-1.3.4/lib/src/text_one_line.dart:207:7: Error: The non-abstract class 'RenderParagraphX' is missing implementations for these members:
     - RenderParagraph.getFullHeightForCaret
    Try to either
     - provide an implementation,
     - inherit an implementation from a superclass or mixin,
     - mark the class as abstract, or
     - provide a 'noSuchMethod' implementation.

    class RenderParagraphX extends RenderBox
          ^^^^^^^^^^^^^^^^
    ../../Applications/flutter%20env/flutter/flutter/packages/flutter/lib/src/rendering/paragraph.dart:750:11: Context: 'RenderParagraph.getFullHeightForCaret' is defined here.
      double? getFullHeightForCaret(TextPosition position) {
              ^^^^^^^^^^^^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dartlang.org/sliding_up_panel-1.0.2/lib/src/panel.dart:218:44: Error: Too few positional arguments: 1 required, 0 given.
      VelocityTracker _vt = new VelocityTracker();
                                               ^
    ../../Applications/flutter%20env/flutter/flutter/packages/flutter/lib/src/gestures/velocity_tracker.dart:152:3: Context: Found this candidate, but the arguments don't match.
      VelocityTracker(this.kind);
      ^^^^^^^^^^^^^^^

    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

所以我认为sliding_up_panel-1.0.2 的最新版本存在一些问题。

除非我想依赖即将发布的 1.0.3,否则我想我唯一的机会就是回滚到以前的颤振版本,对吧(好吧,我也可以禁用所有相关功能)?

有没有比通过 shell 命令卸载并重新安装以前的版本更简单的方法。上次我在使用一些配置文件时遇到了一些困难。目前我正在享受 IntelliJ IDEA 的简洁更新功能(此外,我使用的是 Mac)。

标签: flutterreleaseincompatibility

解决方案


我可以再次建造:-D

这就是我所做的,以防其他人遇到这个问题:

  1. 颤振通道稳定
  2. 颤振升级
  3. 扑干净

PS:之前,我删除了sliding_up_panel的所有痕迹,但仍然出现构建错误。现在一切正常,包括sliding_up_panel


推荐阅读