React Native iOS:重复符号,即`重复符号_OBJC_METACLASS _ $ _ RCTWebSocketModule`

问题描述 投票:1回答:1

因此,我有可怕的多少重复符号,原因不明。

duplicate symbol _OBJC_METACLASS_$_RCTWebSocketModule
duplicate symbol _OBJC_METACLASS_$_RCTWebSocketModule in:
    /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/ArchiveIntermediates/clustr/BuildProductsPath/Release-iphoneos/libReact.a(RCTWebSocketModule.o)
    /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/ArchiveIntermediates/clustr/BuildProductsPath/Release-iphoneos/libRCTWebSocket.a(RCTWebSocketModule.o)
ld: 284 duplicate symbols for architecture arm64

enter image description here

我有点困惑,为什么虽然这是我的图书馆名单

enter image description here

我的Podfile目前是这样的,因为我调查了重复符号背后的原因

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'clustr' do

#    # Flexbox Layout Manager Used By React Natve
   pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
#
#    # React Native
    pod 'React', path: '../node_modules/react-native', subspecs: [
#    # Comment out any unneeded subspecs to reduce bundle size.
    'Core',
#    'DevSupport',
#    'RCTActionSheet',
#    'RCTAnimation',
#    'RCTBlob',
#    'RCTCameraRoll',
##    'RCTGeolocation',
##    'RCTImage',
##    'RCTNetwork',
#    'RCTPushNotification',
##    'RCTSettings',
#    'RCTTest',
##    'RCTText',
##    'RCTVibration',
##    'RCTWebSocket',
##    'RCTLinkingIOS'
    ]

    # OneSignal
    # pod 'OneSignal', '~> 1.13.3'

    # Mapbox
    pod 'react-native-mapbox-gl', :path => '../node_modules/@mapbox/react-native-mapbox-gl'

    pod 'Stripe', '~> 10.1.0'

    inherit! :search_paths
end

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'clustr' do

#    # Flexbox Layout Manager Used By React Natve
   pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
#
#    # React Native
    pod 'React', path: '../node_modules/react-native', subspecs: [
#    # Comment out any unneeded subspecs to reduce bundle size.
    'Core',
#    'DevSupport',
#    'RCTActionSheet',
#    'RCTAnimation',
#    'RCTBlob',
#    'RCTCameraRoll',
##    'RCTGeolocation',
##    'RCTImage',
##    'RCTNetwork',
#    'RCTPushNotification',
##    'RCTSettings',
#    'RCTTest',
##    'RCTText',
##    'RCTVibration',
##    'RCTWebSocket',
##    'RCTLinkingIOS'
    ]

    # OneSignal
    # pod 'OneSignal', '~> 1.13.3'

    # Mapbox
    pod 'react-native-mapbox-gl', :path => '../node_modules/@mapbox/react-native-mapbox-gl'

    pod 'Stripe', '~> 10.1.0'

    inherit! :search_paths
end
react-native react-native-ios
1个回答
0
投票

当我收到此错误时,从Pods目标中删除React可以解决问题。

它是由CocoaPods添加React之间的冲突以及React在链接时通常如何添加到库部分引起的。

© www.soinside.com 2019 - 2024. All rights reserved.