美文网首页
Unable to find a target named `a

Unable to find a target named `a

作者: 张东山 | 来源:发表于2018-04-12 17:10 被阅读253次

这个问题出现在我的workspace中,有两个target:
aaa.xcodeproj and bbb.xcodeproj

但是在工程目录中,aaa 是后来加进来的,导致aaa.xcodeproj 路径在 bbb.xcodeproj(bbb.xcodeproj 跟 xxx.xcworkspace 同目录)的下一级目录,所以Podfile文件中应该如下去写该文件

platform :ios, '8.0'

inhibit_all_warnings! # 忽略引入库的所有警告(强迫症者的福音啊)
#======================================== 公共库 shared_pods ======================================================#

workspace 'xxx'

def shared_pods

    #常用
    pod 'AFNetworking'                                         # 网络框架

end

target 'bbb' do

    # 公共库
    shared_pods

end

target 'aaa' do
    project 'aaa/aaa.xcodeproj'
    # 公共库
    shared_pods

end

这样编辑好后再执行

pod install 

应该就可以了。

相关文章

网友评论

      本文标题:Unable to find a target named `a

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