Pod install命令返回cocoapod1.0.0中的错误

时间:2016-06-07 12:10:53

标签: ios iphone git terminal cocoapods

我将cococapod更新到版本1.0.0。我运行命令 Pod install ,但我立刻得到了错误

You have either:
 * out-of-date source repos which you can update with `pod repo update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

我的pod文件包含以下数据

use_frameworks!

def myPods

    pod 'SDWebImage'
    pod 'Fabric'
    pod 'Crashlytics'
    pod 'MBProgressHUD'

end

target 'APP_DEV' do
    myPods
end

target ‘APPTests' do
    myPods
end

target 'APPUITests' do
    myPods
end

如何解决这个问题?请帮帮我

1 个答案:

答案 0 :(得分:0)

按照它说:

  • 检查您的Pod名称和版本是否正确。
  • 确保您的Podfile的源代码位于顶部 - > source 'https://github.com/CocoaPods/Specs.git'
  • 运行pod repo update

<强> Podfile

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

def myPods

    pod 'SDWebImage'
    pod 'Fabric'
    pod 'Crashlytics'
    pod 'MBProgressHUD'

end

target 'APP_DEV' do
    myPods
end

target ‘APPTests' do
    myPods
end

target 'APPUITests' do
    myPods
end