react-native lottie 添加库无法运行 Failed to build iOS project /error Command failed with exit code 1.

环境:

Xcode 12.4

"react-native": "^0.64.0"

"lottie-ios": "3.1.8"

"lottie-react-native": "^3.5.0"


出现以下错误:

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening NativeSEMS.xcworkspace.

Command line invocation:

    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace NativeSEMS.xcworkspace -configuration Debug -scheme NativeSEMS -destination id=95763931-42A7-41B2-A49A-4249432290B7

The following build commands failed:

Ld /Users/goodwe/Library/Developer/Xcode/DerivedData/NativeSEMS-bipeotrncuysqdasdtpmwbgttazx/Build/Products/Debug-iphonesimulator/NativeSEMS.app/NativeSEMS normal

(1 failure)

info Run CLI with --verbose flag for more details.

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

解决方法:

在ios项目中添加一个swift空文件,然后根据提示创建一个桥接文件,如下图:


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容