尝试将xcode项目构建为手机后出现多声“ c声:错误:没有此类文件或目录”

时间:2018-12-23 00:09:04

标签: ios xcode react-native

在尝试构建自己的React Native项目以在手机上进行测试时,我得到了多个clang: error: no such file or directory的各种文件。我总共收到大约11个单独的错误,这些错误将在下面列出。

clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTBlob.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTAnimation.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTActionSheet.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTGeolocation.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTImage.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTLinking.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTNetwork.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTSettings.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTText.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTVibration.a'
clang: error: no such file or directory: '/Users/bsoleimany/Library/Developer/Xcode/DerivedData/{projectname}-bgjrrdizntqvulcjdjliktxgrpkw/Build/Products/Debug-iphoneos/libRCTWebSocket.a'

我已经尝试将Build Settings-> Build Active Architecture Only切换到Yes,这摆脱了上面的错误,但是显示了这个新错误

ld: library not found for -lRNPhotoView
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我环顾了一下,但找不到有关上述错误的任何信息,有人知道如何消除这些错误吗?

任何有关解决此问题的建议将不胜感激!

1 个答案:

答案 0 :(得分:0)

想问几个问题,您是要存档还是构建发行版本? 回答该问题可能有助于找出问题所在,但请尝试取消选中并行构建。

我在尝试时遇到该错误:  1.存档  2.我的案例是该构建试图同时进行构建,并且在构建时错过了一些库。停用会导致构建运行缓慢,但请确保先构建React库,然后再构建Xcode项目。希望这会有所帮助,尽管我整天都遇到了这个问题。

docs