RN:m1电脑模拟器运行报错in ...libWeChatSDK.a(WechatAuthSDK.o), building for iOS Simulator

RN:m1电脑模拟器运行报错in ...libWeChatSDK.a(WechatAuthSDK.o), building for iOS Simulator,第1张

之前用的非m1的电脑,xcode版本和系统版本比较老,运行项目没有什么问题。

最近新弄了个电脑 m1,系统是最新的 Monterey 12.2.1,xcode版本是13.2.1。想在模拟器运行项目报错,真机运行正常

ld: in /Users/zhangyu/web/yongliu/cmv-app-rf/node_modules/react-native-wechat-lib/ios/libWeChatSDK.a(WechatAuthSDK.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/zhangyu/web/yongliu/cmv-app-rf/node_modules/react-native-wechat-lib/ios/libWeChatSDK.a' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


按照网上说法,加上:

重新打包后又报错:

我找到了这个文件,说这里的 ARCHS[@] 未绑定变量。

接下来我就不知道该怎么搞了,然后我去命令行执行了 yarn ios

objc[6618]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x21a98b678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065f82c8). One of the two will be used. Which one is undefined.
objc[6618]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x21a98b6c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065f8318). One of the two will be used. Which one is undefined.
** BUILD FAILED **

这里网上说是缓存,我就执行了 rm -rf node_modules && yarn cache clean && yarn install && yarn ios 发现没用,所以我怀疑是 pod 的缓存,于是执行 yarn clean

清除后重新执行 pod install,然后 yarn ios 好像也没用

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/994243.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-21
下一篇2022-05-21

发表评论

登录后才能评论

评论列表(0条)

    保存