Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我无法在ios模拟器上使用vs代码构建ios应用程序:无法为模拟器构建应用程序_Ios_Xcode_Flutter_Visual Studio Code_Ios Simulator - Fatal编程技术网

我无法在ios模拟器上使用vs代码构建ios应用程序:无法为模拟器构建应用程序

我无法在ios模拟器上使用vs代码构建ios应用程序:无法为模拟器构建应用程序,ios,xcode,flutter,visual-studio-code,ios-simulator,Ios,Xcode,Flutter,Visual Studio Code,Ios Simulator,在mac上使用vscode构建ios应用程序时,我面临以下问题: launching lib/main.dart on iPhone 11 Pro Max in debug mode... Xcode build done. 16.8s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's o

在mac上使用vscode构建ios应用程序时,我面临以下问题:

launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Xcode build done.                                           16.8s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/SW-Mac/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SwiftSpeechRecognitionPlugin.swift:111:58: error: type 'AVAudioSession.Category' (aka 'NSString') has no member 'record'
        try audioSession.setCategory(AVAudioSession.Category.record, mode: .default)
                                     ~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
    /Users/SW-Mac/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SwiftSpeechRecognitionPlugin.swift:111:73: error: type 'String' has no member 'default'
        try audioSession.setCategory(AVAudioSession.Category.record, mode: .default)
                                                                           ~^~~~~~~
    /Users/SW-Mac/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SwiftSpeechRecognitionPlugin.swift:112:50: error: type 'AVAudioSession.Mode' (aka 'NSString') has no member 'measurement'
        try audioSession.setMode(AVAudioSession.Mode.measurement)
                                 ~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~
    /Users/SW-Mac/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SwiftSpeechRecognitionPlugin.swift:113:22: error: 'setActive(_:options:)' has been renamed to 'setActive(_:with:)'
        try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
                         ^~~~~~~~~       ~~~~~~~
                         setActive       with
    AVFoundation.AVAudioSession:15:15: note: 'setActive(_:options:)' was introduced in Swift 4.2
        open func setActive(_ active: Bool, options: AVAudioSessionSetActiveOptions = []) throws
                  ^
    /Users/SW-Mac/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SwiftSpeechRecognitionPlugin.swift:186:15: error: value of type 'AVAudioSession.Category' (aka 'NSString') has no member 'rawValue'
            return input.rawValue
                   ~~~~~ ^~~~~~~~
    note: Using new build system
    note: Planning build
    note: Constructing build description
    warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Exited (sigterm)
颤振医生:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.15.2 19C57, locale en-GB)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.42.0)
[✓] Connected device (1 available)

• No issues found!

我不确定软件包是否有问题(因为它在android中构建得很好),或者我的颤振安装/配置是错误的。请帮助提供建议。

您可能需要先在Xcode上构建它。然后可以使用VS代码运行