Carthage 添加依赖库 找不到framework 。error: unable to find utility "xcodebuild", not a developer tool o...

新接手的一个项目,想要给它添加FLEX,依赖管理用的cocoapods 与carthage,我管的部分用carthage
按部就班的添加依赖,Terminal上报个error

error: unable to find utility "xcodebuild", not a developer tool or in PATH

看看什么影响吧,点开xcode发现 Linked Frameworks and Libraries 里找不到FLEX.framework
正常应该在 项目/Carthage/Build/iOS/ 里面找到添加的framework的

stackoverflow 找到回答 解决

就是首次用的时候会发生这种状况,定位不到你的开发工具(Xcode) 设置一下就好了

Xcode > Preferences > Locations


Carthage 添加依赖库 找不到framework 。error: unable to find utility
选择你的Command Line Tools

鉴于每次换电脑都要stackoverflow一下这个问题(脑子啊,总忘)还是记下吧

--------<我是华丽的分割线>--------

简单说下carthage
cd到项目的文件夹目录下

$ touch Cartfile

然后可以直接打开Cartfile 或者

$ vim Cartfile

编辑添加

 github  "xxx/xxx" ~> x.x.x

更新命令

$ carthage update --platform iOS

打开项目的文件夹


Carthage 添加依赖库 找不到framework 。error: unable to find utility
目录结构

到这算是把依赖down好了 至于怎么加到项目中我看过三种
第一种是 直接把framework加到embedded binaries里

add XXXX.framework to the embedded binaries of your target, as it would otherwise be included in all builds

第二种是 添加到 Link Binary with Libraries

Carthage 添加依赖库 找不到framework 。error: unable to find utility
image.png

( What is the difference between Embedded Binaries and Linked Frameworks)

第三种 不加到 Link Binary with Libraries

你可能感兴趣的:(Carthage 添加依赖库 找不到framework 。error: unable to find utility "xcodebuild", not a developer tool o...)