【发布时间】:2020-05-15 07:08:10
【问题描述】:
对于一个 react-native 项目,我在 Xcode 构建期间收到以下错误:
clang: error: no such file or directory: '/Users/user172615/Library/Developer/Xcode/DerivedData/xxx/Build/Products/Debug-appletvsimulator/libBVLinearGradient.a'
Command Ld failed with a nonzero exit code
这发生在添加react-native-linear-gradient 后,并按照https://github.com/react-native-community/react-native-linear-gradient 中的说明进行操作(iOS 手动安装)。
- 如https://github.com/react-native-community/react-native-linear-gradient#manually 中所指定,libBVLinearGradient.a 包含在目标
myProject的Build Phases -> Link Binary With Libraries中 - libBVLinearGradient.a 也包含在
General -> Frameworks, Libraries and embedded content中。 - 我尝试删除 DerivedData,然后重新构建。没有帮助。
- 由于错误指示
Debug-appletvsimulator,我将libBVLinearGradient.a 包含在Build Phases -> Link Binary With Libraries中,用于目标myProject-tvOS - 当这没有帮助时,我删除了
myProject-tvOS目标。一切都没有帮助。
我使用的是 Xcode 11.3,react-native 0.59.9。
有什么想法吗?
【问题讨论】:
-
libBVLinearGradient.a库是否存在并包含在您的 iOS 目标中? -
是的,在 Build Phases -> Link Binary With Libraries and General -> Frameworks, Libraries and embedded content 。我用更多细节更新了这个问题。