2016-12-04 81 views
3

我想在我的iPhone應用程序安裝admobs(用Objective-C)。我一直在使用SWIFT項目實施過很多次,但目前我不斷收到以下生成錯誤:的Xcode錯誤:庫沒有找到-lGoogleToolboxForMac

ld: warning: directory not found for option '-L/Users/charlieseligman/Library/Developer/Xcode/DerivedData/ThamesClippers-csissodainpbbjenykdyxuutzxtg/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac' 
ld: warning: directory not found for option '-L/Users/charlieseligman/Documents/GIT/iOS.ThamesClippers/build/Debug-iphoneos/GoogleToolboxForMac' 
ld: library not found for -lGoogleToolboxForMac 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我肯定打開文件.xcworkspace(而不是.xcodeproj文件)。

我也試着刪除「DerivedData」文件夾的內容&「清潔」項目,並做一個「乾淨生成文件夾」。沒有人解決了這個問題。

我podfile只包括以下莢:

# Pods for ThamesClippers 
pod 'Google/Analytics' 
pod 'Firebase/Core' 
pod 'Firebase/AdMob' 

# Trying to fix GoogleToolboxForMac missing error 
pod 'Firebase/Messaging' 
pod 'GoogleToolboxForMac/Logger' 
pod 'GoogleToolboxForMac', '~> 2.1' 

我曾嘗試加入底3一個接一個,但一直得到相同的生成錯誤。

任何人都可以幫忙嗎?在這一個完整的損失。看到這兩個問題,但他們接受的解決辦法還沒有解決這個問題:

Framework not found GoogleToolboxForMac ld: library not found for -lGoogleToolboxForMac

回答

16

終於研究出瞭解決:

  1. 的Xcode>產品>方案>管理計劃
  2. 選擇「顯示」這是失敗的方案(GoogleToolboxForMax)
  3. 選擇下拉該方案只是「停止」按鈕右側的
  4. 構建這個方案
  5. 然後選擇原來的方案(在第3步中提到的下拉菜單)和重建

所有正確建立。

所以它看起來像我不得不手動建立獨立的方案。

注意:要自動建立這些使用產品>方案>「編輯計劃」>生成>,並確保所有指標均在底部你的項目目標增加。

+0

那麼,它解決了錯誤;然而,它把我帶到另一個錯誤-_- –

相關問題