加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – ld:使用cocoapods找不到-lBolts的库

发布时间:2020-12-14 17:47:13 所属栏目:百科 来源:网络整理
导读:每个人 我遇到的问题是我无法编译我的应用程序,因为我收到以下错误: ld: library not found for -lBoltsclang: error: linker command failed with exit code 1 (use -v to see invocation) 我将我的XCode项目配置为使用cocoapods,这是我的pod列表: pod 'G
每个人

我遇到的问题是我无法编译我的应用程序,因为我收到以下错误:

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

我将我的XCode项目配置为使用cocoapods,这是我的pod列表:

pod 'Google/Analytics','~> 1.0.0'
pod 'AFNetworking','~> 2.0'
pod 'XCDYouTubeKit','~> 2.4.0'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'Parse'
pod 'ParseUI'
pod 'ParseFacebookUtilsV4'
pod 'ParseTwitterUtils'

这是命令pod install的输出:

Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.6.3)
Installing Bolts (1.5.0)
Installing FBSDKCoreKit (4.8.0)
Installing FBSDKLoginKit (4.8.0)
Installing FBSDKShareKit (4.8.0)
Installing Google (1.0.7)
Installing GoogleAnalytics (3.14.0)
Installing GoogleNetworkingUtilities (1.0.0)
Installing GoogleSymbolUtilities (1.0.3)
Installing GoogleUtilities (1.1.0)
Installing Parse (1.10.0)
Installing ParseFacebookUtilsV4 (1.9.1)
Installing ParseTwitterUtils (1.9.1)
Installing ParseUI (1.1.7)
Installing XCDYouTubeKit (2.4.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 10 dependencies from the Podfile and 15 total pods installed.

我尝试过的事情:

>清洁和重建
>退出xcode,清理并重建
>删除所有窗格并重新安装,清理和重建

解决方法

我有两个问题:

>第一个问题是我正在构建我原来的YourApp.xcodeproj Xcode项目文件.

根据react-native

From now on open YourApp.xcworkspace instead of YourApp.xcodeproj in Xcode.

所以我不得不切换到由pod init(或任何生成它)的Cocoapods生成的新的YourApp.xcworkspace.
> react-native项目的自述文件没有提到如果您之前已经根据步骤4将Facebook SDK添加到YourApp.xcodeproj的Frameworks文件夹中.将SDK添加到您的Xcode Project of Facebook SDK for iOS – Getting Started教程,那么您应该删除这些引用,因为Cocoapods会将FB SDK代码拉入Pods文件夹,因此您不再需要单独引用FB SDK.否则,Xcode会尝试根据Cocoapods的设置和指令进行构建,但会找到包含“不是dylib”的二进制文件的FB SDK.

最终,您的Frameworks文件夹应该只有libPods-YourApp.a文件.

清理,然后构建项目.它应该工作.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读