簡體   English   中英

無法使用CocoaPods安裝SDWebImage:“ ld:找不到-lSDWebImage的庫”

[英]Can't install SDWebImage with CocoaPods : “ld: library not found for -lSDWebImage”

我正在嘗試使用Cocoapods將SDWebImage導入我的iOS項目。

所以我已經安裝了Cocoapods,並在我的項目目錄中創建了這個Podfile:

platform :ios, '7.0'
target 'MyProjectV6' do
pod 'SDWebImage', '~>3.7'
end

然后我使用pod install命令運行它,一切似乎都很好:

Analyzing dependencies
Downloading dependencies
Installing SDWebImage 3.7.5 (was 3.7.5)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

我還在Xcode中看到一個在我的項目目錄中創建的Pods文件夾。 它包含兩個.xcconfig文件,如下所示:

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage"
OTHER_LDFLAGS = $(inherited) -ObjC -l"SDWebImage" -framework "ImageIO"
PODS_ROOT = ${SRCROOT}/Pods

但是當我構建項目時,出現此錯誤:

在此處輸入圖片說明

我還在我的Frameworks文件夾中添加了一個“ libPods-MyProjectV6.a”,但該文本為紅色,因此我猜出了什么問題,但我不知道...

謝謝你的幫助。

您是否打開了Workspace或Project文件? 確認您打開了第一個

你有嘗試過嗎?

rm -rf Pods/ Podfile.lock
pod install

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM