【问题标题】:Problems after upgrading to Flutter 2.5, Could not build the precompiled application for the device升级到 Flutter 2.5 后出现的问题,无法为设备构建预编译的应用程序
【发布时间】:2021-11-08 02:51:59
【问题描述】:

自从升级到 Flutter 2.5 后,我一直遇到问题。我也尝试过flutter clean并重新启动。但这并没有解决。寻求帮助!

我用手机颤动了一下,但没有用。

> flutter run

Launching lib/main.dart on lswlsw in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: SWD9W7PNH2
Running pod install...                                              3.7s
Running Xcode build...                                                  
Xcode build done.                                           37.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mongol-2.2.0/lib/src/editing/text_selection/mongol_text_s
    election_controls.dart:71:10: Error: The method 'MongolTextSelectionControls.buildHandle' has fewer positional arguments
    than those of overridden method 'TextSelectionControls.buildHandle'.
      Widget buildHandle(
             ^
    ../../../../Developer/flutter/packages/flutter/lib/src/widgets/text_selection.dart:123:10: Context: This is the overridden
    method ('buildHandle').
      Widget buildHandle(BuildContext context, TextSelectionHandleType type, double textLineHeight, [VoidCallback? onTap,
      double? startGlyphHeight, double? endGlyphHeight]);
             ^
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mongol-2.2.0/lib/src/editing/text_selection/mongol_text_s
    election_controls.dart:109:10: Error: The method 'MongolTextSelectionControls.getHandleAnchor' has fewer positional
    arguments than those of overridden method 'TextSelectionControls.getHandleAnchor'.
      Offset getHandleAnchor(TextSelectionHandleType type, double textLineWidth) {
             ^
    ../../../../Developer/flutter/packages/flutter/lib/src/widgets/text_selection.dart:128:10: Context: This is the overridden
    method ('getHandleAnchor').
      Offset getHandleAnchor(TextSelectionHandleType type, double textLineHeight, [double? startGlyphHeight, double?
      endGlyphHeight]);
             ^
    Failed to package /Users/lsw/Desktop/FLUTTER/Geuloo/geuloo.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    /Users/lsw/Desktop/FLUTTER/Geuloo/geuloo/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target
    'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in
    target 'Toast' from project 'Pods')

Could not build the precompiled application for the device.

Error launching application on lswlsw.

Flutter 2.5.0 • 通道稳定 • https://github.com/flutter/flutter.git 框架 • 修订版 4cc385b4b8(4 天前) • 2021-09-07 23:01:49 -0700 引擎 • 修订版 f0826da7ef 工具 • Dart 2.14.0

【问题讨论】:

    标签: flutter dart build precompiled


    【解决方案1】:

    由于这个包mongol,您遇到了这个问题,您需要转到他们在 github 上的问题部分并提交一份问题报告,以便他们修复他们的代码以使用新的 Flutter 版本。

    【讨论】:

    • 非常感谢。删除 mogol 包后,它工作正常。谢谢!
    猜你喜欢
    • 2021-05-05
    • 2023-03-07
    • 2021-04-02
    • 2022-08-11
    • 2022-06-15
    • 2022-07-19
    • 2021-11-28
    • 2020-03-26
    • 1970-01-01
    相关资源
    最近更新 更多