解决: [!] Unable to add a sourcewithurl`https://github.com/CocoaPods/Specs.git`named`master`. You ...

 本来cocopods没有问题,最近创建项目,利用cocopods导入第三方库的时候,出现如下错误:

[!] Unable to add a sourcewithurl`https://github.com/CocoaPods/Specs.git`named`master`.

You cantryadding it manuallyin`~/.cocoapods/repos`or via`pod repo add`.

解决方案:

pod repoaddmaster https://github.com/CocoaPods/Specs.git然后提示执行’pod setup’,如果出现

[!] The `master` repoisnota git repo.

然后进入 /users/你的用户名/.cocoapods/repos,删除master文件夹

然后执行:

pod setup


还是自己手贱删除了pod文件导致,解决了开心

你可能感兴趣的:(解决: [!] Unable to add a sourcewithurl`https://github.com/CocoaPods/Specs.git`named`master`. You ...)