2016-12-04 69 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

那么,它解决了错误;然而,它把我带到另一个错误-_- –