“pod install"后的重复目标 [英] Duplicate target after "pod install"

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

问题描述

在向项目添加新依赖项并运行 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文件结构:

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?

推荐答案

首先,尝试使用目标规范包装您的 Pod,如下所示:

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 没有设置您项目的基本配置,因为您的项目已有自定义配置集.

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. 为两个 Pod 相关目标设置 None 配置集
  3. 再次运行pod install

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

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