簡體   English   中英

Flutter.io (dart) 應用程序無法在 iOS 模擬器上啟動

[英]Flutter.io (dart) app fails to launch on iOS simulator

我有最新的 OSX Sierra、最新的 XCode 和適用的插件,以及一個打開並准備就緒的 iPhone 6 模擬器。

我已按照https://flutter.io/setup-macos/#ios-setup上的所有說明進行操作。

當我從終端“顫動運行”時,應用程序無法安裝在模擬器上並顯示消息:

無法為模擬器構建應用程序。 在 iPhone 6 上啟動應用程序時出錯。

這是終端所說的......


            Launching lib/main.dart on iPhone 6 in debug mode...
Running pod install...                                8.5s
Running Xcode build...                               24.1s
Failed to build iOS app
Error output from Xcode build:
↳
    2017-11-22 13:13:38.122 xcodebuild[47659:25935636]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-13510/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/Runtime/PBXTargetBuildContext.mm:757
    Details:  unexpected successful exit code from cancelled command <C0009:'CpResource app.flx':P12>
    Object:   <PBXTargetBuildContext: 0x7fccf1235200>
    Method:   -createCommandInvocationRecordFromInvocation:
    Thread:   <NSThread: 0x7fccf2847ea0>{number = 16, name = (null)}
    Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
    ** BUILD FAILED **
    
    
    The following build commands failed:
        CopyPlistFile /Users/deborah/Desktop/chq_emulator/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist Runner/GoogleService-Info.plist
    (1 failure)
Xcode's output:
↳
    Build settings from command line:
        ARCHS = x86_64
        BUILD_DIR = /Users/deborah/Desktop/chq_emulator/build/ios
        ONLY_ACTIVE_ARCH = YES
        SDKROOT = iphonesimulator11.1
    
    === CLEAN TARGET leveldb-library OF PROJECT Pods WITH CONFIGURATION Debug ===
    ... list of subsidiary infomation ...

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

還有其他人提供有關如何在模擬器上運行 Flutter 的建議嗎?

首先嘗試運行您的 Xcode 並確保它是最新的。 打開在 Xcode 上構建的{flutter_project}/ios ,然后嘗試從那里在模擬器上運行 iOS 項目。

如果仍有問題,可以在終端上運行此命令。 這應該設置活動開發人員目錄的路徑。

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM