【发布时间】:2018-10-29 14:16:10
【问题描述】:
我正在使用 React-Native 和 react-native-maps 但如果我想构建它会构建失败。错误是“Apple Mach-O 链接器错误组”
错误:
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/DoubleConversion'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/Folly'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/Google-Maps-iOS-Utils'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/React'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/glog'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/react-native-google-maps'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/react-native-maps'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/yoga'
ld: library not found for -lDoubleConversion
clang: error: linker command failed with exit code 1 (use -v to see invocation)
编辑:
将“仅构建活动架构”设置为“是”
并添加谷歌地图库!
【问题讨论】:
-
这听起来很经典,删除“DerivedData” :) 转到 Xcode->Preferences->Locations 并点击 derivedDataPath 后面的小箭头...删除 DerivedData 中的所有内容
-
它不起作用。我清理并清理了项目,但没有工作
-
好的,但我看到你已经发现了问题。不错,编码愉快 :)
-
但现在我想构建到我的设备,错误仍在继续
标签: ios swift xcode react-native react-native-maps