Flutter 无法仅在物理 iOs 设备中构建和运行 iOS 应用程序

时间:2021-07-01 03:29:26

标签: ios xcode flutter

我正在尝试构建并运行一个“计数器应用程序”(创建 flutter 项目时的默认应用程序),我可以在 android 和 iOs 模拟器中运行该项目,在物理设备上可以完美地在 android 中运行,但是当我运行vscode 中的项目出现错误。

我运行项目时的输出是:

Downloading libimobiledevice...
Launching lib/main.dart on iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: FSB8SU7R5X
Xcode build done.                                           16.0s
Failed to build iOS app
Error output from Xcode build:
↳
    2021-06-30 22:16:22.665 xcodebuild[43211:324927]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
    Details:  (null) deviceType from 281a05c1d363c04aed318582d30866afde2dd04c was NULL when -platform called.
    Object:   <DTDKMobileDeviceToken: 0x7faac3b77c10>
    Method:   -platform
    Thread:   <NSThread: 0x7faac0c416c0>{number = 2, name = (null)}
    Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
    2021-06-30 22:16:22.867 xcodebuild[43211:324928]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
    Details:  (null) deviceType from 281a05c1d363c04aed318582d30866afde2dd04c was NULL when -platform called.
    Object:   <DTDKMobileDeviceToken: 0x7faac3b77c10>
    Method:   -platform
    Thread:   <NSThread: 0x7faac3b69fe0>{number = 6, name = (null)}
    Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
    2021-06-30 22:16:22.991 xcodebuild[43211:324928]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
    Details:  (null) deviceType from 281a05c1d363c04aed318582d30866afde2dd04c was NULL when -platform called.
    Object:   <DTDKMobileDeviceToken: 0x7faac3b77c10>
    Method:   -platform
    Thread:   <NSThread: 0x7faac3b69fe0>{number = 6, name = (null)}
    Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
    ** BUILD FAILED **
Xcode's output:
↳
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    note: Removed stale file '/Users/jromero/Library/Developer/Xcode/DerivedData/Runner-flkwoylypfarbpbtarvmoxfypnce/Build/Products/Debug-iphoneos/Runner.app'
Could not build the precompiled application for the device.

Error launching application on iPhone.
Exited (sigterm)

我尝试清理项目(flutter clean,获取包并再次运行)但没有工作:c。

Flutter 医生输出:

[✓] Flutter (Channel stable, 2.2.2, on macOS 11.4 20F71 darwin-x64, locale en)
    • Flutter version 2.2.2 at /Users/jromero/development/flutter
    • Framework revision d79295af24 (3 weeks ago), 2021-06-11 08:56:01 -0700
    • Engine revision 91c9fc8fe0
    • Dart version 2.13.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/jromero/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/jromero/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      ? https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      ? https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2021.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 57.0.5
    • Dart plugin version 211.7665

[✓] VS Code (version 1.57.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.23.0

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114

• No issues found!

欢迎任何帮助 c:

0 个答案:

没有答案