简体   繁体   English

使用Cocoapods的DJI iOS SDK 4.5问题

[英]DJI iOS SDK 4.5 issue using Cocoapods

I have trying to install DJI iOS SDK 4.5 using cocoapods in sample code downloaded from DJI website. 我尝试使用从DJI网站下载的示例代码中的cocoapods安装DJI iOS SDK 4.5。

Every-time I try pod install it throws error saying 每次我尝试pod install都会抛出错误提示

CocoaPods could not find compatible versions for pod "DJI-SDK-iOS":
In Podfile:
DJI-SDK-iOS (~> 4.5)
None of your spec sources contain a spec satisfying the dependency: `DJI-SDK-iOS (~> 4.5)`

I even tried uninstalling cocoapods and reinstalling it again, but no luck. 我什至尝试卸载cocoapods并再次重新安装,但是没有运气。

Error appeared because your source repository is out of date. 出现错误,因为您的源存储库已过期。 You can resolve the issue by running: 您可以通过运行以下命令解决问题:

pod install --repo-update pod安装--repo-update


If this does not solve your problem, check if your cocoa-pods version is updated one. 如果这不能解决您的问题,请检查您的可可豆荚版本是否已更新。 You can follow the below link for the same. 您可以按照以下链接进行操作。

update cocoapods version 更新cocoapods版本


Explanation: 说明:

When you will run pod install , you will found the possible reason of this error as: 当您运行pod install ,您会发现此错误的可能原因是:

None of your spec sources contain a spec satisfying the dependency: DJI-SDK-iOS (~> 4.5) . 您的规格来源均未包含满足依赖性的规格: DJI-SDK-iOS (~> 4.5)

You have either: 您有:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update . 您可以使用pod repo updatepod install --repo-update来更新过期的源repos。
  • mistyped the name or version. 输入错误的名称或版本。
  • not added the source repo that hosts the Podspec to your Podfile. 没有将托管Podspec的源存储库添加到您的Podfile中。

Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default. 注意:从CocoaPods 1.0开始,默认情况下,在pod install中不会进行pod repo update

I tried pod install --repo-update it was not able to update as it kept on throwing error 我尝试了pod install --repo-update但由于抛出错误而无法更新

Updating spec repo master [!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down 更新规范仓库master [!]无法连接到GitHub以更新CocoaPods /规范规范仓库-请检查您是否已离线或GitHub已关闭

Finally I found the solution my prob in: https://stackoverflow.com/a/48962041/32140 最后,我在以下位置找到了我的问题的解决方案: https : //stackoverflow.com/a/48962041/32140

After this I was able to install the new pod version 之后,我可以安装新的Pod版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM