【问题标题】:How to link react-native-vector-icons to project如何将 react-native-vector-icons 链接到项目
【发布时间】:2016-05-20 22:08:33
【问题描述】:

我收到 react-native-icons 的构建错误。我从他们的 github 站点的安装说明中执行了链接命令。消息说图标已经链接到项目。

ld /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/NativeStarter.app/NativeStarter 正常 x86_64 cd /Users/rsanchez/Development/NativeStarter.git/ios 导出 IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/ usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9。 2.sdk -L/Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator -F/Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejrwdqafazh/Build/ Products/Debug-iphonesimulator -filelist /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Intermediates/NativeStarter.build/Debug-iphonesimulator/NativeStarter.build/Objects-normal/x86_64/NativeStarter.LinkFileList - Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.0 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -lRNVectorIcons /Users/rsanchez/Library/Developer/Xcode /DerivedData/NativeStarter-ddtqngxgxoergggtejjrwd qafazh/Build/Products/Debug-iphonesimulator/libReact.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/rsanchez/Library/Developer/ Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/ rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/-Debugsimulator libRCTNetwork.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/rsanchez/Library/Developer/Xcode/DerivedDat a/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTVibration.a /Users/rsanchez/库/开发者/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -Xlinker -dependency_info -Xlinker /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejrwdqafatz/BuildmediaIntermedia NativeStarter.build/Debug-iphonesimulator/NativeStarter.build/Objects-normal/x86_64/NativeStarter_dependency_info.dat -o /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/NativeStarter。应用程序/NativeStarter

ld: 找不到 -lRNVectorIcons 的库 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

【问题讨论】:

    标签: ios xcode react-native


    【解决方案1】:

    我所做的只是遵循 github 中的文档。

    我刚刚运行rnpm link,它无需手动操作即可运行。

    请确保您已安装“rnpm”

    npm install rnpm -g
    

    【讨论】:

    • 帮了我很多忙。谢谢
    【解决方案2】:

    我们更新了Native Starter Pro 的文档。请查看常见问题解答下的第一个问题

    http://strapmobile.com/docs/native-starter-pro/faqs/

    概率:

    • 如果您的系统中安装了“npm3”,这可能是问题所在。
    • 确保您已安装“npm2”。
    • 在 XCode 中链接 Vector Icons 存储库将解决该问题

    解决方案 1:拖放链接 RN Vector Icons 文件:

    • 在您的查找器/计算机中,导航到(项目文件夹)-> node_modules -> react-native-vector-icons
    • 将 RNVectorIcons.xcodeproj 拖到边栏中的库中,如下图所示

    解决方案 2:手动链接 RN Vector Icons 文件:

    • 转到 Xcode 中的“构建阶段”
    • 通过单击“+”将二进制文件与库链接
    • 点击“添加其他”
    • 导航到“NativeStarter”(项目文件夹)-> node_modules -> react-native-vector-icons
    • 选择“RNVectorIcons.xcodeproj”
    • 干净的构建
    • 重新构建

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-25
      • 1970-01-01
      • 2016-05-27
      • 1970-01-01
      • 2022-10-05
      • 2017-09-16
      • 1970-01-01
      相关资源
      最近更新 更多