今天更新了下系統,結果用CocoaPods下載第三方庫的時候出現了錯誤,"The dependency 'xxx' is not used in any concrete target"。如下圖所示:
原來是因爲更新了系統以後需要指明 target。
解決辦法:修改 podfile,如下圖所示:
在需要下載的庫的前面和後面加上 target "xxx" do 和 end,例如我的項目是一個新聞的 app,把 ‘News’ 替換爲你的 target 名即可。
今天更新了下系統,結果用CocoaPods下載第三方庫的時候出現了錯誤,"The dependency 'xxx' is not used in any concrete target"。如下圖所示:
原來是因爲更新了系統以後需要指明 target。
解決辦法:修改 podfile,如下圖所示:
在需要下載的庫的前面和後面加上 target "xxx" do 和 end,例如我的項目是一個新聞的 app,把 ‘News’ 替換爲你的 target 名即可。