在"pod安装"之后复制目标. [英] Duplicate target after "pod install"

查看:166
本文介绍了在"pod安装"之后复制目标.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

向项目添加新的依赖关系并运行pod install后,我的工作区(.xcworkspace)中的目标重复如下:

After I added new dependency to my project and run pod install, I have duplicate target in my workspace(.xcworkspace) as below:

这是pod文件的结构:

And this is the pod file structure:

platform :ios, '8.0'
use_frameworks!
pod 'AFNetworking', '~> 2.6'
pod 'Fabric'
pod 'Crashlytics'
pod 'SocketRocket'

我重新启动了项目,也重新启动了Xcode,但这无济于事.原因是什么,我该如何解决?

I restart the project and also Xcode, but it does not help. What is the reason and how can I solve the problem?

推荐答案

首先,尝试使用目标规范包装吊舱,如下所示:

First, try to wrap your pods with target specification, like this:

target 'TargetName' do
  pod 'Fabric'
  pod 'Crashlytics' 
  #other pods 
end

  1. 按照@SukruK的建议删除您的.xcworkspace,podfile.lock和pods文件夹.
  2. 再次执行pod install并打开创建的工作区.
  1. Delete your .xcworkspace, podfile.lock and pods folder, just as @SukruK suggested.
  2. Do pod install again and open the workspace created.

您可以按照以下说明来解决此配置问题CocoaPods did not set the base configuration of your project because your project already has a custom config set.

You can do the following instructions in order to fix this configuration issue CocoaPods did not set the base configuration of your project because your project already has a custom config set.

  1. 转到您的项目设置
  2. 为两个与Pods相关的目标设置None配置集
  3. 再次运行pod install
  1. Go to your project settings
  2. Set None configuration set for both Pods-related targets
  3. Run pod install again

这篇关于在"pod安装"之后复制目标.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆