首页 > 解决方案 > 使用颤振编译到iOS时找不到错误是什么

问题描述

我已经尝试了大多数我能找到但无法修复错误的东西。我所有的包裹似乎都有问题。该代码在android上编译并运行。当我尝试在 Xcode 中编译代码时,它会在到达 firebase_auth 时停止。Flutter 版本是 1.22.6,我在设备上将开发目标设置为 10。我遇到的问题是一切,我可以向上滚动直到达到最大计数。

   ../../flutter/packages/flutter/lib/src/semantics/semantics.dart:2052:7: Error: Can't assign to the final variable 'childrenInHitTestOrder'.
      childrenInHitTestOrder = _kEmptyChildList;
      ^^^^^^^^^^^^^^^^^^^^^^
../../flutter/packages/flutter/lib/src/semantics/semantics.dart:2056:7: Error: Can't assign to the final variable 'childrenInTraversalOrder'.
      childrenInTraversalOrder = Int32List(childCount);
      ^^^^^^^^^^^^^^^^^^^^^^^^
../../flutter/packages/flutter/lib/src/semantics/semantics.dart:2062:7: Error: Can't assign to the final variable 'childrenInHitTestOrder'.
      childrenInHitTestOrder = Int32List(childCount);
      ^^^^^^^^^^^^^^^^^^^^^^
../../flutter/packages/flutter/lib/src/semantics/semantics.dart:3653:47: Error: Getter not found: 'isSlider'.
  bool get isSlider => _hasFlag(SemanticsFlag.isSlider);
                                              ^^^^^^^^
../../flutter/packages/flutter/lib/src/semantics/semantics.dart:3655:28: Error: Getter not found: 'isSlider'.
    _setFlag(SemanticsFlag.isSlider, value);
                           ^^^^^^^^
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.

Error launching application on Benjamin’s 

添加了更多错误,这与我的本地化有关。但是我添加了所有内容,就像它在为 iOS 添加本地化的操作指南中所说的那样。当我尝试添加不可为空的部分时,它会破坏我已经编写的代码,因为我没有为此编写代码。

../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1382:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerHourLabelMany => null;
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1385:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerHourLabelOne => 'sat';
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1391:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerHourLabelTwo => null;
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1394:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerHourLabelZero => null;
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1397:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerMinuteLabelFew => 'min.';
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1400:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerMinuteLabelMany => null;
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1403:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerMinuteLabelOne => 'min.';
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1409:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerMinuteLabelTwo => null;
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1412:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerMinuteLabelZero => null;
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1415:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerSecondLabelFew => 'sec.';
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1418:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.
  String? get timerPickerSecondLabelMany => null;
        ^
../../flutter/packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart:1421:9: Error: This requires the null safety language feature, which is experimental and requires language version of 2.10 or higher.
You can enable the experiment using the '--enable-experiment=non-nullable' command line option.

标签: iosflutter

解决方案


它现在可以工作了,我所做的是我删除了颤振,重新下载了相同的版本。编译,现在它安装在设备上。


推荐阅读