"无法在模拟器上构建应用程序。""在iPhone 11上启动应用程序时出错。"

3

我需要帮助,因为我不小心认为我删除了一些Flutter框架,现在每当我想通过Android Studio在IOS模拟器上启动应用程序时就会出现这个错误。

我已经更新了Pods并更改了pod.lock文件,但似乎什么都没有起作用。请问是否有人能够帮忙?

Xcode's output:
↳
    error: the following command failed with exit code 0 but produced no further output
    CompileC /Users/joshuachase/Library/Developer/Xcode/DerivedData/Runner-bhfxndfyrvpnssfyeliwkcyzjvoz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/image_picker.build/Objects-normal/x86_64/FLTImagePickerPlugin.o /Users/joshuachase/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7+4/ios/Classes/FLTImagePickerPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    ../../Developer/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 {
                             ^^^^^^^^^^^^^^^^^^^
    ../../Developer/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 {
                                               ^^^^^^^^^^^^^^^^^^^
    ../../Developer/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 {
          ^
    ../../Developer/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 {
                   ^
    ../../Developer/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);
              ^^^^^^^^^^^^^^^^^^^
    ../../Developer/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' ('../../Developer/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(),
                                 ^^^^^^^^^^^^^
    ../../Developer/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
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

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

你尝试过运行 flutter clean 吗? - undefined
如果没有发生任何事情,请尝试将flutter-svg版本升级到最新版。也许这会有所帮助 https://github.com/dnfield/flutter_svg/issues/413 - undefined
这个不起作用,我已经升级到最新版本了。 - undefined
尝试运行flutter build ios命令,是否会出现相同的错误? - undefined
完全相同的问题。 - undefined
1个回答

0

去设备上擦除模拟器的所有设置,尝试运行 .xcworkspace 而不是 xcodeproj


好的,我完成了第一步,现在我该如何在Android Studio中运行.xcworkspace文件?非常抱歉,我是新手。 - undefined

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