Cocoapod的Xcode错误:“无法保存文档。该文件不存在“ [英] Xcode error with Cocoapod: "The document could not be saved. The file doesn’t exist"

查看:2936
本文介绍了Cocoapod的Xcode错误:“无法保存文档。该文件不存在“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 SPGooglePlacesAutocomplete 添加到我的项目中 - 我遇到了一个很奇怪的问题。当我尝试运行我的项目时,Xcode说在Pod的头部有一个错误:



SPGooglePlacesAutocompleteQuery.h:65:23:Unknown类型名称'CGFloat'



尝试调整该文件中的任何内容(例如导入UIKit)会导致错误:文档SPGooglePlacesAutocompleteQuery。文件不存在



这个文件不存在可能是什么原因?

解决方案

对于什么是值得的,在我的情况下,当我试图编辑Xcode中的警告/错误窗格指向的文件时出现错误。 >

不知道那是可可豆相关的,但我碰巧也用pod。



基本上你得到一个错误,点击并尝试修改该文件以修复错误,有时,不确定如何,Xcode产生此错误。



由于Xcode卡住试图保存更改文件,则必须撤消对错误浏览器中的文件所做的任何更改。然后,通过在常规浏览器中而不是警告/错误窗格中单击来编辑文件,您可以修改该文件并保存。



我正在运行Xcode 6.1 .1和Cocoapods 0.36.0.rc.1,并且当尝试从作为开发pod添加的pod修改文件(即从本地目录)时会发生这种情况。


I've added the SPGooglePlacesAutocomplete cocoapod to my project -- and I'm getting a really weird issue. When I try to run my project, Xcode says there's an error in one of the Pod's headers:

SPGooglePlacesAutocompleteQuery.h:65:23: Unknown type name 'CGFloat'

Attempting to adjust anything in that file - such as importing UIKit - results in an error: "The document SPGooglePlacesAutocompleteQuery.h could not be saved. The file doesn’t exist"

What could be making Xcode thing this file is non-existent?

解决方案

For what it's worth, in my case the error came up when I was trying to edit a file pointed to by the warning/error pane in Xcode.

Not sure if that's cocoa pod related but I happen to be using pods also.

Basically you get an error, click on it and try to modify the file to fix the error and sometimes, not sure how, Xcode produces this error.

Since Xcode is stuck trying to save the changes to the file, you have to undo any changes you're made to the file in the error browser. Then editing the file by clicking on it in the regular browser instead of the warning/error pane will let you modify the file and save it.

I'm running Xcode 6.1.1 and Cocoapods 0.36.0.rc.1 and this happens when trying to modify a file from a pod added as a development pod (i.e. from a local directory).

这篇关于Cocoapod的Xcode错误:“无法保存文档。该文件不存在“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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