我有一台配备 m1 的 MacBook。当我输入
flutter doctor
时,一切都很好。我可以在 Xcode 中使用 Runner 构建应用程序,但是当我尝试在模拟器或我的设备上通过 VSC 运行应用程序时,出现错误:
Error (Xcode): Target debug_unpack_ios failed: Exception: Failed to codesign /Users/me/Desktop/coding/program.nosync/my_awsome_app_1705/build/ios/Debug-iphonesimulator/Flutter.framework/Flutter with identity -. Could not build the application for the simulator. Error launching application on iphone 13.
当我尝试使用模拟器或设备进行操作时,没有任何区别。我可以在 Runner 中使用 Xcode 构建这个应用程序。
`
在终端中运行以下命令:
flutter clean
flutter build ios --release