【发布时间】:2022-01-25 19:07:18
【问题描述】:
我已经为 Andriod 构建并运行了我的颤振应用程序。但是当我第一次尝试为 Mac 构建它时,它显示以下错误。
我是 mac 环境的新手。我必须在 Xcode 中进行一些更改吗?
我的 Xcode 版本:Version 13.2.1。
但是,如果我使用 VS CODE 在我的 MAC 中创建一个新的颤振项目,它运行良好。我必须为 ios 运行我的 exting Flutter 应用程序。帮助我在 iOS 上实现这一目标。
Launching lib/main.dart on iPhone 13 in debug mode...
lib/main.dart:1
Xcode build done. 9.0s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Command CompileSwiftSources failed with a nonzero exit code
<unknown>:0: error: unable to load standard library for target 'arm64-apple-ios10.0'
/Users/sambitdas/Development/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.7/ios/Classes/RazorpayDelegate.swift:2:8: error: module compiled with Swift 5.5.1 cannot be imported by the Swift 5.5.2 compiler: /Users/sambitdas/sleepKart/sleepkart/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
import Razorpay
^
<unknown>:0: error: unable to load standard library for target 'arm64-apple-ios10.0'
/Users/sambitdas/Development/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.7/ios/Classes/RazorpayDelegate.swift:2:8: error: module compiled with Swift 5.5.1 cannot be imported by the Swift 5.5.2 compiler: /Users/sambitdas/sleepKart/sleepkart/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
import Razorpay
^
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Could not build the application for the simulator.
Error launching application on iPhone 13.
Exited (sigterm)
【问题讨论】:
-
确保您已启动并运行 iOS 10 模拟器。删除派生数据,清理构建文件夹。并再次运行。
-
X-code 只允许我从 iOS 版本 11 到 iOS 版本 15.2 ..但是如果我从 pubspec..ymal 中删除 Razorpay 依赖项,那么它就可以完美运行.. 这是与 razorpay 相关的问题吗? (我在我的 mac 的 VS-code 中运行我退出的颤振代码)
-
你解决了这个@Toujo
标签: ios xcode flutter razorpay flutter-razorpay