flutter 无法运行build/ios/iphoneos/Runner.app< iphonedevice>

8fq7wneg  于 2023-10-22  发布在  Flutter
关注(0)|答案(1)|浏览(451)

错误消息:

Could not run build/ios/iphoneos/Runner.app on <iphonedevice>.
Try launching Xcode and selecting "Product > Run" to fix the problem:
  open ios/Runner.xcworkspace

它本来在真实的机器上工作得很好,但在我更新到ios 17和xcode 15后就坏了。
我试着在Xcode中运行它,它可以工作,但它在Android Studio和VSCode中不工作。
Flutter医生-v:

[✓] Flutter (Channel stable, 3.7.12, on macOS 14.0 23A344 darwin-arm64, locale
    zh-Hant-TW)
    • Flutter version 3.7.12 on channel stable at
      /Users/davis_ho/fvm/versions/3.7.12
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (6 months ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/davis_ho/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.12.1

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

[✓] Android Studio (version 2022.2)
    • 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 17.0.6+0-17.0.6b802.4-9586694)

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

已尝试:
1.重新安装Flutter。
1.在Xcode中解配对iPhone。
1.卸载应用程序。

  1. VPN和设备管理,接受或信任.
zhte4eai

zhte4eai1#

解决

我把Flutter升级到了3.13.6,它可以工作了!

Flutter 3.13.5更改

3.13.5 (September 20, 2023)
flutter/134825 - Fixes an issue where apps built in profile mode would not install or run on physical iOS 17 devices.
flutter/45598 - Fix permissions on macos artifacts making mac framework readable and executable by all

https://github.com/flutter/flutter/releases/tag/3.13.5

相关问题