gpt4 book ai didi

swift - 多个目标匹配产品引用/链接器标志的隐式依赖

转载 作者:行者123 更新时间:2023-12-02 04:20:44 30 4
gpt4 key购买 nike

免责声明 - 我没有 Xcode/iOS 开发经验。在这一点上,我继续谷歌搜索,但我只是在尝试随机修复我不理解的问题。我可以在 Android 上继续使用该应用程序,但用户需要支持 iOS。

当前构建错误:

Multiple targets match implicit dependency for product reference 'libReactNativeNavigation.a'. 
Consider adding an explicit dependency on the intended target to resolve this ambiguity.
(in target 'AwesomeProject' from project 'AwesomeProject')

Multiple targets match implicit dependency for linker flag '-lReactNativeNavigation'.
consider adding an explicit dependency on the intended target to resolve this ambiguity.
(in target 'AwesomeProject' from project 'AwesomeProject')

背景

这是一个 React Native 移动应用程序,在过去的几个月里一直运行良好,直到两周前我有其他重要的工作需要将我的精力转向。我两周前退出/关闭 Xcode,几天前重新打开以恢复,但我收到类似

的错误
no podspec found in node_modules (I don't remember the exact problem)

在尝试修复它时,我 deintegrated/cleaned/modified/reinstalled pod as detailed here .

然后不知何故我得到了这个错误:

React/RCTEventEmitter.h file not found
(+ a 2nd similar message for another file)

今天,我试过了1.清理DerivedData 一种。相对于我的 Xcode 项目移动它,2. 将Build Active Architecture Only设置为No,3. Step 5: If Xcode complains when linking... (except I don't think it was a *.a static library I added?

现在,构建在几秒钟后失败了:

Multiple targets match implicit dependency for product reference 'libReactNativeNavigation.a'. 
Consider adding an explicit dependency on the intended target to resolve this ambiguity.
(in target 'AwesomeProject' from project 'AwesomeProject')

Multiple targets match implicit dependency for linker flag '-lReactNativeNavigation'.
consider adding an explicit dependency on the intended target to resolve this ambiguity.
(in target 'AwesomeProject' from project 'AwesomeProject')

我认为 Podfile 很简单?

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'AwesomeProject' do
# Pods for AwesomeProject
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'

pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'

pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'react-native-camera', :path => '../node_modules/react-native-camera'

pod 'react-native-cameraroll', :path => '../node_modules/@react-native-community/cameraroll'

pod 'react-native-orientation-locker', :path => '../node_modules/react-native-orientation-locker'

target 'AwesomeProjectTests' do
inherit! :search_paths
# Pods for testing
end

use_native_modules!
end

target 'AwesomeProject-tvOS' do
# Pods for AwesomeProject-tvOS

target 'AwesomeProject-tvOSTests' do
inherit! :search_paths
# Pods for testing
end

end

最佳答案

我相信这只是一个警告,我的项目中也有一个。我正在手动链接库,完成所有步骤,但我的项目未能构建。由于没有错误,我认为它不起作用的原因一定是在这个警告中,但我错了。如果可以,请返回错误“React/RCTEventEmitter.h file not found”,因为这是可以解决的。 React/RCTEventEmitter.h file not found@chitzui 回答帮助我解决了我的问题

关于swift - 多个目标匹配产品引用/链接器标志的隐式依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60005087/

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