Несколько целей соответствуют неявной зависимости для ссылки на продукт / для флага компоновщика - PullRequest
3 голосов
/ 31 января 2020

Отказ от ответственности - я неопытен в разработке Xcode / iOS. На данный момент я продолжаю поиск в Google, но я просто пытаюсь случайные исправления, которые я не понимаю. Я могу двигаться вперед с приложением на 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, которое отлично работало в течение последних нескольких месяцев, вплоть до двух недель go, когда мне пришлось выполнять другую важную работу, направленную на переключение моих усилий. Я вышел / закрыл XCode две недели go и снова открыл несколько дней go, чтобы получить ответ, но я получил ошибку вроде

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

При попытке исправить это, я дезинтегрированный / очищенный / модифицированный / переустановленный модуль, как описано здесь .

Тогда как-то я получил эту ошибку:

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

Сегодня я попробовал 1. очистка DerivedData a. перемещая его относительно моего проекта Xcode, 2. Установка Build Active Architecture Only в No, 3. Шаг 5: Если Xcode жалуется при связывании ... (за исключением того, что я не думаю, что это было * .a stati c библиотеку, которую я добавил?

Теперь сборка завершается неудачей через несколько секунд:

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

1 Ответ

0 голосов
/ 31 марта 2020

Это происходит со мной, когда я добавляю подспецы тоже. Я не могу изменить эту настройку, но в вашем случае ReactNative поддерживает All subspe c? Извините, я не знаю много об этой структуре, поскольку я намеренно избегал ее в течение многих лет; надеюсь, что некоторые ReactNative эксперты могут помочь.

...