gpt4 book ai didi

ios - M1 Air 上的 React Native 无法为 iOS 构建

转载 作者:行者123 更新时间:2023-12-04 17:18:11 25 4
gpt4 key购买 nike

我在中断了一段时间(比如 2 个月左右)后又回到了一个项目中,但尝试在我的 M1 Air 上运行我的应用程序却无法构建。我已经使用 react-native-clean-project 来清理我尝试修复此问题的更改之间的项目。

我在运行 react-native clean-project-auto 时得到了这个

Error running 'wipe iOS build artifacts': objc[39430]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x11bab82b8). One of the two will be used. Which one is undefined.
objc[39430]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x11bab8308). One of the two will be used. Which one is undefined.

Error running 'wipe iOS build artifacts': objc[39432]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1136902b8). One of the two will be used. Which one is undefined.

Error running 'wipe iOS build artifacts': objc[39432]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x113690308). One of the two will be used. Which one is undefined.

XCode 版本:12.5React 原生版本:0.64.0

我得到的错误:

objc[37733]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1166cc2b8). One of the two will be used. Which one is undefined.
objc[37733]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f1926c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1166cc308). One of the two will be used. Which one is undefined.
** BUILD FAILED **

The following build commands failed:
CompileC /Users/kollinfrancis/Library/Developer/Xcode/DerivedData/KanjiDraw-ggmdygefcdmywmhkmjeavmfhuhel/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/RCTTurboModuleManager.o /Users/kollinfrancis/Documents/Projects/KanjiDraw/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

我正在运行的命令:npm 运行 ios

我的播客文件:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'

platform :ios, '13.0'

target 'X' do
use_unimodules!
config = use_native_modules!

use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)

target 'XTests' do
inherit! :complete
# Pods for testing
end

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!({ 'Flipper' => '0.90.0', 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3' })

post_install do |installer|
react_native_post_install(installer)
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
end

最佳答案

在我的播客文件中,我将 use_flipper 更新为

use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.1', 'Flipper-RSocket' => '1.3.1')

然后我将我的 react-native 从 0.64 更新到 0.64.1

关于ios - M1 Air 上的 React Native 无法为 iOS 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67961306/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com