现在的位置: 首页 > 综合 > 正文

Xcode4——cocos2d 真机调试 报错处理办法

2013年08月12日 ⁄ 综合 ⁄ 共 1668字 ⁄ 字号 评论关闭

1.Code Sign error: Provisioning profile ‘XXXX'can't be found

 问题原因:
	在Xcode中当你更新了你的证书,并且再重新编译你的程序,真机调试一直会出现 Code Sign error: Provisioning profile ‘XXXX’ can't be found。
解决方法:
  a.关闭你的项目,找到项目文件XXXX.xcodeproj,在文件上点击右键,选择“显示包内容”(Show Package Contents)。会新打开一个Finder。注:其实XXXX.xcodeproj就是一个文件夹,这里新打开的一个Finder里面的三个文件就是该XXXX.xcodeproj文件夹里面的文件。                   
 b.在新打开的Finder中找到project.pbxproj,并且打开。在这之中找到你之前的证书的编码信息。我之前报的错误信息是  Code Sign error: Provisioning profile '37D44E7F-0339-4277-9A82-C146A944CD46',所以我用查找的方式找到了所有包括37D44E7F-0339-4277-9A82-C146A944CD46的行,并且删除。                   
 c.保存,重新启动你的项目,再编译。就OK了。
 说明:我也遇到上上述问题:安装其他程序到真机上是OK的,就是安装一个从其他同事那拷过来的程序总是提示证书错误,clean也不起作用,很郁闷。
我在按照上面方法做的时候,还有一个问题,直接从错误提示中右击,选择“copy”,然后到project.pbxproj这个文件下去搜索,总是提示"Not Found"。我就尝试在错误上右击,选择"Open XXX As Transcript Text File",然后在其中拷贝37D44E7F-0339-4277-9A82-C146A944CD46,再搜索,就可以搜索到了。删除三行,保存,再编译就OK了。
2. putpkt: write failed: Broken pipe.
解决方法:
a) quit Xcode (and therefor the GDB it is running)
b) unplug device
c) delete app from device (hold icon till x appears)
d) turn off device
e) turn on device
f) plug in device (if itunes wants to sync, let it finish)
g) launch Xcode

worked for me
Solved! I have been able to reliably avoid this error completely:
1. Before doing a new build, always stop the debugger first.
2. Then stop the app on the device.
3. Only after doing the above 2 steps, then build and go.
That’s all you need. (No need to restart Xcode, restart device, delete app from device, etc.)
PS. This is a bug in XCode.

3.
Couldn't register XXX with the bootstrap server. Error: unknown error code.3.

This generally means that another instance of this process was already running or is hung in the debugger.(gdb)

问题原因:运行了多个工程,xcode无法识别。

解决方法:重启xcode,关闭真机上的app。

4. ‘GL_MAX_SAMPLES' undeclared (first use in this function)

解决办法:

我所遇到的问题原因是调试时出现了两个相同的active scheme(在左上角),换成另一个就可以了。

大家有什么问题可以留言,如果我能力范围内我尽量帮忙解决。

真机调试教材:点击打开链接

抱歉!评论已关闭.