0

在颤振中导入 Razorpay 插件后,我的应用程序不是为 iOS 模拟器构建的。它在 iOS 物理设备和 Android 模拟器上运行,但在为模拟器构建时我无法找出此错误的原因。

错误:

Launching lib/main.dart on iPhone 13 in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                           37.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **


Xcode's output:
↳
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
/Users/kaushalkishore/Developer/flutter/.pub-   cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.9/ios/Classes/RazorpayDelegate.swift:2:8: error: module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/kaushalkishore/StudioProjects/entryking/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
import Razorpay
       ^
/Users/kaushalkishore/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.9/ios/Classes/RazorpayDelegate.swift:2:8: error: module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/kaushalkishore/StudioProjects/entryking/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.
4

1 回答 1

0

您可以通过删除 xcode 中的派生数据并将 arm64 添加为排除架构来解决此问题。

检查此 github 问题以获取更多信息:问题

于 2022-01-27T16:21:03.463 回答