Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 迦太基:没有github的可用版本满足要求(两个框架使用不同版本导入Alamofire)_Ios_Git_Alamofire_Carthage - Fatal编程技术网

Ios 迦太基:没有github的可用版本满足要求(两个框架使用不同版本导入Alamofire)

Ios 迦太基:没有github的可用版本满足要求(两个框架使用不同版本导入Alamofire),ios,git,alamofire,carthage,Ios,Git,Alamofire,Carthage,在我的iOS应用程序中,我尝试使用Carthage导入两个框架——它们都依赖Alamofire(但版本不同) 当我运行迦太基更新--platform ios时,我得到一个错误: 没有github的可用版本“Alamofire/Alamofire”满足要求:==4.7.1 在iOS应用程序的Cartfile中,我包含了一个私有框架和AlamofireImage: git”ssh://git@.com/.git”“iOS本身与您使用carthage添加的依赖项无关。问题在于您(carthage)用于

在我的iOS应用程序中,我尝试使用Carthage导入两个框架——它们都依赖Alamofire(但版本不同)

当我运行
迦太基更新--platform ios
时,我得到一个错误:

没有github的可用版本“Alamofire/Alamofire”满足要求:==4.7.1

在iOS应用程序的Cartfile中,我包含了一个私有框架和AlamofireImage:


git”ssh://git@.com/.git”“iOS本身与您使用carthage添加的依赖项无关。问题在于您(carthage)用于每个项目的脚本。carthage使用每个项目配置(cartfile),并且它必须满足要求


因此,如果您想要相同框架的不同版本(我一点也不推荐它!它浪费了大量资源,延长了应用午餐时间!并且可能导致副作用),您应该将它们嵌入到每个项目中。

我最后做的是使用
github“Alamofire/Alamofire”“~>4.7
在我的私有框架回购中,并在iOS应用程序中使用github“Alamofire/Alamofire”“4.7.3”
。现在一切正常


我还养成了删除迦太基缓存的习惯——删除
~/Library/Caches/org.Carthage.CarthageKit/DerivedData

在我使用Alamofire的项目中,我确实更喜欢直接将Alamofire项目作为主项目的附属项目,而不是依赖CocoaPods或Carthage。这种方法让我感觉在更新存储库时可以更好地控制更改,这对我也很有用。但我想知道更详细的原因。