我试图归档并构建抖动的IOS项目,以便最终生成IPA,但由于此错误而苦苦挣扎,我试图遵循有关similar问题的现有问题,明白了:
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:26: Error: Type 'DiagnosticableMixin' not found.
class PictureStream with DiagnosticableMixin {
^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:44: Error: Type 'DiagnosticableMixin' not found.
abstract class PictureStreamCompleter with DiagnosticableMixin {
^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:7: Error: The type 'DiagnosticableMixin' can't be mixed in.
class PictureStream with DiagnosticableMixin {
^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:16: Error: The type 'DiagnosticableMixin' can't be mixed in.
abstract class PictureStreamCompleter with DiagnosticableMixin {
^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:167:11: Error: Superclass has no method named 'debugFillProperties'.
super.debugFillProperties(properties);
^^^^^^^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:171:30: Error: The method 'toStringShort' isn't defined for the class 'PictureStreamCompleter'.
- 'PictureStreamCompleter' is from 'package:flutter_svg/src/picture_stream.dart' ('../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart').
Try correcting the name to the name of an existing method, or defining a method named 'toStringShort'.
ifPresent: _completer?.toStringShort(),
^^^^^^^^^^^^^
../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:266:11: Error: Superclass has no method named 'debugFillProperties'.
super.debugFillProperties(description);
^^^^^^^^^^^^^^^^^^^
Command PhaseScriptExecution failed with a nonzero exit code
此问题可能是什么原因?
答案 0 :(得分:7)
我的情况就是这样,我使用了websafe_svg 1.1.0,它取决于flutter_svg ^0.17.4。根据 @Lutaaya Huzaifah Idris 的建议,此问题已在flutter_svg: ^0.18.0
的最新更新中得到解决。
因此,如果您使用websafe_svg
,请在pubspec.yaml
中添加以下行以解决此问题,
dependency_overrides:
flutter_svg: ^0.18.0
答案 1 :(得分:4)
我所做的是将flutter_svg软件包降级为 flutter_svg: ^0.17.4
,并且构建通过了。
我认为对于颤动的情况,当发生此错误时,很可能是您包装上的问题。首先运行flutter pub get
看看是否可行,或者尝试flutter clean
。如果所有软件包都运行良好,那么您在IOS中的构建将通过。
答案 2 :(得分:2)
我遇到了同样的问题,我只是将Flutter版本降级了。
从(https://github.com/flutter/flutter),Clickhere to see attached image
获取颤振的最新标记版本转到目录目录并运行
git checkout v1.16.3
完成后,转到VS终端并运行Flutter Doctor。让它完成。重新启动VS(编辑器)。您现在可以构建它。