我正在为ios构建一个带电容的应用程序。当我启动命令'npx cap sync ios‘(启动pod install)时,我得到这个错误:
✖ Updating iOS native dependencies with "pod install" (may take several minutes):
✖ update ios:
[error] Error running update: Analyzing dependencies
Cloning spec repo `trunk` from `https://cdn.cocoapods.org/`
[!] Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`.
You can try adding it manually in `/Users/damien/.cocoapods/repos` or via `pod repo add`.如果我执行命令:
pod repo add trunk https://cdn.cocoapods.org/我得到这个错误
[!] Repo name `trunk` is reserved for CocoaPods' main spec repo accessed via CDN.我在这个问题上被屏蔽了6个小时。我在网上看了所有关于这个错误的帖子。
发布于 2020-03-27 21:47:04
临时解决方案:
我在Podfile的顶部添加了‘`source 'https://github.com/CocoaPods/Specs.git’
platform :ios, '11.0'
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
....但下载我的Users/damien/.cocoapods/repos/文件夹?中的所有存储库(2.5 my )需要30分钟
发布于 2020-09-22 15:19:56
您可以使用以下命令恢复trunk:
pod repo add-cdn trunk https://cdn.cocoapods.org/可在以下位置找到:https://github.com/CocoaPods/CocoaPods/issues/10078#issuecomment-696481185
发布于 2020-09-23 01:42:11
另一种方法可以让它在本地工作,因为这个CDN是一个问题
pod repo remove trunk在Podfile中
source 'https://github.com/CocoaPods/Specs.git'
# source 'https://cdn.cocoapods.org/'可在以下位置找到:https://github.com/CocoaPods/CocoaPods/issues/10078
https://stackoverflow.com/questions/60884826
复制相似问题