美文网首页
Carthage 添加依赖库 找不到framework 。e

Carthage 添加依赖库 找不到framework 。e

作者: 青珩 | 来源:发表于2018-05-10 11:35 被阅读0次

新接手的一个项目,想要给它添加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


选择你的Command Line Tools

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

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

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

$ touch Cartfile

然后可以直接打开Cartfile 或者

$ vim Cartfile

编辑添加

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

更新命令

$ carthage update --platform iOS

打开项目的文件夹


目录结构

到这算是把依赖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

image.png

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

第三种 不加到 Link Binary with Libraries

相关文章

网友评论

      本文标题:Carthage 添加依赖库 找不到framework 。e

      本文链接:https://www.haomeiwen.com/subject/iqrzrftx.html