小编Ben*_*raw的帖子

为什么在 xcode 方案构建目标列表中出现 React(missing)?

我正在尝试使用 xcode 在 ios 设备上运行我的第一个 React-Native 应用程序并不断收到此错误:

ld: warning: directory not found for option '-L/Users/XXXX/Library/Developer/Xcode/DerivedData/nigh-hktjvygosupgnoaafsvgyowhzsqi/Build/Products/Debug-iphoneos/React'

ld: library not found for -lReact
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

我假设原因与我的 Scheme 的构建目标列表中缺少 React 的事实有关。React 是列表中的第一个,所有复选框都被选中,但它显示的是 React(missing) 而不是 React:

构建目标列表的屏幕截图

如果我点击“+”按钮,React 不是一个选项。这是我的 podfile:

platform :ios, '10.0'

require_relative '../node_modules/react-native-unimodules/cocoapods'

target 'nigh' do
  # Pods for nigh
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',
    'DevSupport',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTBlob',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText', …
Run Code Online (Sandbox Code Playgroud)

xcode dependency-injection ios react-native podfile

9
推荐指数
1
解决办法
4943
查看次数

标签 统计

dependency-injection ×1

ios ×1

podfile ×1

react-native ×1

xcode ×1