首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >链接lottie-ios后的编译错误

链接lottie-ios后的编译错误
EN

Stack Overflow用户
提问于 2018-11-13 01:31:48
回答 1查看 1.9K关注 0票数 1

我试图链接lottie-ios,但是我有一个编译错误。Lottie在android仿真器中工作得很好。

以下是我所做的工作: 1. npm i--保存lottie-react-本机@2.3.2. Here本机链接lottie-ios 3. react本机链接lottie-react原生4.打开Xcode项目配置,并将Lottie.framework添加为嵌入式二进制文件

我有多个编译错误,从这个开始:

代码语言:javascript
运行
复制
/Users/user/Code/CSULB/CECS_543/anacodiam_ios/node_modules/lottie-react-native/src/ios/../../../react-native/ReactCommon/fabric/graphics/platform/ios/float.h:8:10: fatal error: "limits" file not found
    #include <limits>
    While building module "UIKit" imported from /Users/user/Code/CSULB/CECS_543/anacodiam_ios/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTViewManager.h:8:
    While building module "Foundation" imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
    In file included from <module-includes>:1: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: fatal error: could not build module "CoreFoundation"
    #include <CoreFoundation/CoreFoundation.h>

我的反应-本土化版本:

代码语言:javascript
运行
复制
react-native -V
0.57.4

屏幕截图这里是我的项目设置(文件>项目设置):https://imgur.com/MgyNqDj

我的一般设置:https://imgur.com/HoghSUA

我的头搜索路径:https://imgur.com/Hd5ngHh

我按照这个问题的要求添加了$(SRCROOT)/../node_modules/react-native/React/Github

和我的构建阶段:https://imgur.com/cg630rS

提前谢谢你。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-11-13 10:12:07

正如Anhtu所说,lottie的自动链接可能会中断。另外,我也遇到了同样的编译问题:您应该将lottie-react-native更新为最新版本(目前为2.5.9),他们修复了他们的iOS项目header search path设置。

在2.5.8版本中,他们的项目使用递归选项引用React文件夹,这会导致CodeFoundation构建错误。(这曾经是ReactNative推荐的,但从:https://facebook.github.io/react-native/docs/linking-libraries-ios开始就改变了)他们从2.5.9开始就删除了这个header search path,现在这个CoreFoundation错误已经消失了!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53272484

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档