Flutter:错误:非抽象类'RenderParagraphX'缺少这些成员的实现,由'sliding_up_panel-1.0.2'引起。

4

我昨天更新了Flutter之后,遇到了以下错误信息:

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版本,否则我想我的唯一机会就是回滚到之前的flutter版本,对吗(好吧,我也可以禁用所有相关功能)?

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

1个回答

1
我可以再次构建 :-D
以下是我所做的,以防其他人遇到此问题:
  1. flutter channel stable
  2. flutter upgrade
  3. flutter clean
PS: 在此之前,我删除了所有滑动面板的痕迹,但仍然出现构建错误。现在一切都正常,包括滑动面板。

1
尝试过但没有成功 :( - ysk silver

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接