在开发的过程中难免会遇到很多的错误,可是当看到系统给出的英文时,又不知道是什么意思。所以这篇文章总结了Xcode中常见的一些英文单词及词组,可以帮助初学的人快速了解给出的提示。多练习,就肯定能基本掌握。

expression:表达式

assignable:赋值
variable:变量+
redefinition:重复定义
type:类型
conflicting:冲突项
invalid:无效的
conversion:转换
specifier:说明符
indent:缩进
operands:运算对象、操作数
binary:二进制
expected:期望
logical:逻辑
const :常量
constant:常量
statements:语句
initialization:初始化
condition:条件
increment:增量
index:索引、下标
abbrev:简写、缩写
alias:别名,化名
modified:修改/改进的
parameter:参数
implicit:隐含的
undo:取消
redo:重做
cancel:取消
octal:八进制的
incompatible:不匹配的
duplicate:重复
action:行为
instance:实例
modify:修改
general:普通的   in general:大体,一般来说
subclass:子类
superclass:父类
inherit:继承
contents:内容
primitive:原始的
modify:修改
ordered:有序的
collection:集合
dynamic:动态的
querying:查询
deriving:派生
description:描述,描写
collection:集合
programmatic:编程的
a set of:一系列、一组
overview :概述
related 相关的
declared in:声明在...(文件里)
availability:可用的
framework:框架、类库
Conforms to:服从....协议
Conforms :服从
dynamic:动态
term:条目
exact:确切的
membership:成员
entry:条目
consists of:由...组成
unique:独特的、唯一的
determined:决定
conform to:服从,遵照
protocol:协议
distinct:不同的、独特的
addition:添加、增加
literals:字面量
denote:表示,指示
category:类目、分类
concrete:具体的
decouples:解耦
KVC:Key-Value Coding:键值对编码

Getting Numeric Values:获得一个数值
Identifying and Comparing Strings:识别和比较字符串
Replacing Substrings:替换子串
Finding Characters and Substrings:查找字符和子串
Dividing Strings:分割字符串
Combining Strings:拼接字符串
Getting C Strings:得到c语言的字符串
Getting Characters and Bytes:获取字符或字节
Getting a String’s Length:得到字符串的长度
Writing to a File or URL:把内容写到一个文件或者URL里
Creating and Initializing a String from a File:从文件里创建并初始化一个字符串
Deprecated:弃用
Creating and Initializing Strings:创建初始化字符串
tasks:功能
Adopted Protocols:采用的/服从的协议

1: local declaration “XXX”hide instance variable

reason:一般是你函数里面定义的变量和class属性变量重名了。很少有和系统变量重名的情况。 这样的情况,修改一下变量的名字就好。

2、Undefined symbols for architecture x86_64:

可能由于某些类库不支持64位Architecture造成,

可以在项目Build Setting=》Architecture设为非64位的选项

3、编译warning:ld: warning: directory not foundfor option

选择工程, 编译的 (targets)

选择 Build Settings 菜单

查找 Library Search Paths 和 Framework Search Paths,删掉编译报warning的路径即OK

4、Undefined symbols for architecture armv7s: “_OBJC_CLASS_$_SZAdWebViewDelegate”, referenced from:xxxx

查找了半天,总以为缺少某个文件,后对比正常的sample发现问题出在armv7s,这是针对iPhone5 cpu优化的编译,可能你某个库不支持,解决方法是:

Build Setting->Build Active Architecture only 的值由NO设为YES,查了一下这个选项的资料:

这个属性设置为yes,是为了debug的时候编译速度更快,它只编译当前的architecture版本。

而设置为no时,会编译所有的版本。

这个是设备对应的architecture:

armv6:iPhone 2G/3G,iPod1G/2G

armv7:iPhone 3GS/4/4s,iPod3G/4G,iPad1G/2G/3G

armv7s:iPhone5, iPod5

编译出的版本是向下兼容的(不太对,应该说,设备是向下兼容的),比如你设置此值为yes,用iphone4编译出来的是armv7版本的,iphone5也可以运行,但是armv6的设备就不能运行。

所以,一般debug的时候可以选择设置为yes,release的时候要改为no,以适应不同设备。

5、Xcode “Attaching to…” 卡住,模拟器停留在启动界面

网上有很多方法,什么Clean Build Folder,和各种删除,但有一个点是优先要考虑的,就是host没有修改过,修复如下:

1、error: macro names must be identifiers YourProject_prefix.pch

原因: 因为你弄脏了预处理器宏,在它处于<Multiple Values>的时候修改了它

解决方法: Configiration选择All Configirations,清空它 然后分别重新定义你的Debug,Release,Distributin预处理器宏吧

2、warning: no rule to process file '$(PROJECT_DIR)/LoadingView.h' of type sourcecode.c.h for architecture armv6

原因: Target里Compile Sources里含有头文件 了,那里面不需要头文件

解决方法: 从Target里Compile Sources里删除头文件

3、Command /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng failed with exit code 1

原因: png图像文件拷贝失败,看看信息上面提示Can't find哪个文件,一般都是从文件系统里删除文件而没有通过Xcode删除造成的,Xcode的项目配置文件依然纪录着这个文件的引用

解决办法: 给文件系统里增加相应的文件,或者从Xcode的Groups & Files删除它,或者从Target的Copy Bundle Resources里删除它

4、Code Sign error: The identity 'iPhone Developer: Your Name' doesn't match any valid certificate/private key pair in the default keychain

原因: 签名错误

解决办法: Target -> Get Info -> Build -> Code Signing -> 修改签名

记得左上角的Configuration类型要跟当前Build类型对应(Debug, Release, Distribution),否则改了也白改

5、could not create bundle folder for versioned model *.moda(好像是这个后缀名的这个文件)

原因:编译一次会产生一个新的

解决办法:应该把编译产生出来的moda文件都删了,然后clean下工程,重新build即可

6、error:There are no valid certificate/private key pairs in the default keychain

7、error:Cannot assign to 'self' outside of a method in the init family

原因:只能在init方法中给self赋值,Xcode判断是否为init方法规则:方法返回id,并且名字以init     +大写字母开头+其他  为准则。例如:- (id) initWithXXX;

出错代码:- (id) Myinit{

self = [super init];

……

}

解决方法:- (id) initWithMy

{

self = [super init];

}

1, iOS真机调试时,报错:failed to get the task for process 20900

原因:

证书问题,project和targets的证书都必须是开发证书,ADHOC的证书会出现此问题。

解决方案:

project和targets的证书使用开发证书。

2,当 一个socket正在连接,这时又一个新的socket建立链接,会抛出错误 “ Attempting to connect while connected or accepting connections. Disconnect first.”。

原因:

第一个socket还没返回isConnected  为YES,   就建立第二个socket连接。

解决方案:

AsyncSocket有个属性叫isDisconnected,但接口并未开放,将- (BOOL)isDisconnected;
加入到AsyncSocket.h中。
然后在连接处:
if(![_sendSocket isDisconnected])

{

[_sendSocket disconnect];

}

3,tcp socket willDisconnectWithError:Error Domain=NSPOSIXErrorDomain Code=65

"The operation couldn’t be completed. No route to host"

No route to host (socket error ::10065) 

       产生此问题的原因:网络连接不上此服务器。

       解决:查看ip是否正确,查看调试设备网络连接是否正常。

4,报错:CALayer bounds contains NaN:

绘图时,某个长宽值中包含除数为0的操作。

5,报错:libxml/tree.h not found

      解决方案:

步骤1:

工程-->PROJECT-->Build Settings

将“Header Search Paths”的值设置为<${SDK_DIR}/usr/include/libxml2>即可。

步骤2:

工程-->TARGETS-->Build Settings

将“Header Search Paths”的值设置为<${SDK_DIR}/usr/include/libxml2>即可。

OC Xcode中常见的错误的更多相关文章

  1. iOS开发OC基础:Xcode中常见英文总结,OC常见英文错误

    在开发的过程中难免会遇到很多的错误,可是当看到系统给出的英文时,又不知道是什么意思.所以这篇文章总结了Xcode中常见的一些英文单词及词组,可以帮助初学的人快速了解给出的提示.多练习,就肯定能基本掌握 ...

  2. python中常见的错误

    python中常见的错误   1.IndentationError: unindent does not match any outer indentation leve 众所周知,Python语法要 ...

  3. React native开发中常见的错误

    react native环境搭建请移步:react native环境搭建 这里说说react native创建完成之后,运行中出现的常见问题, 问题1: java.lang.RuntimeExcept ...

  4. postman中常见的错误

    get请求400错误,post请求405错误 (2016-08-31 17:19:27)转载▼出现错误原因,后台接收参数part使用的是List,参数的属性对不上,传参使用的类型是String,改为p ...

  5. FPGA quartus开发中常见的错误处理

    1.Warning: An incorrect timescale is selected for the Verilog Output (.VO) file of this PLL design. ...

  6. Laravel中常见的错误与解决方法小结

    一.报错: 「Can't swap PDO instance while within transaction」 通过查询 Laravel 源代码,可以确认异常是在 setPdo 方法中抛出的: ? ...

  7. 饮冰三年-人工智能-Python-30 python开发中常见的错误

    1:触发条件:创建的实体类生成到数据库表时报错 报错信息:TypeError: __init__() missing 1 required positional argument: 'on_delet ...

  8. 滴水穿石-07Java开发中常见的错误

    1:使用工具Eclipse 1.1 "语法错误" 仅当源级别为 1.5 时已参数化的类型才可用 设置eclipse,窗口—>java—>编译器—>JDK一致性调到 ...

  9. python中常见的错误类型

    Python异常类 Python是面向对象语言,所以程序抛出的异常也是类.常见的Python异常有以下几个 ,大家只要大致扫一眼,有个映像,等到编程的时候,相信大家肯定会不只一次跟他们照面(除非你不用 ...

随机推荐

  1. UVA10298 Power Strings

    UVA10298 Power Strings hash+乘法逆元+一点点数学知识 我们用取余法算出主串的hash,然后从小到大枚举子串的长度 显然,如果若干个子串的复制的hash值之和等于主串的has ...

  2. JS获取周、月、季度日期

    效果: 代码: //用于获取日期本周.本月.本季度的js //Author : guanghe //文件引用方法:<script src="${staticPath}/common/j ...

  3. 移动页面click延迟引发的touch问题

    一.事件捕获与冒泡 先扯一下事件的触发流程,这个之后会用到. DOM2级事件规定事件包括三个阶段: ① 事件捕获阶段 ② 处于目标阶段 ③ 事件冒泡阶段 大概的流程就是事件从最外层一层一层往里面传递( ...

  4. SpringBoot中的Quartz应用

    Spring自带定时器任务: code: import org.springframework.beans.factory.annotation.Configurable; import org.sp ...

  5. UVa 10618 跳舞机

    https://vjudge.net/problem/UVA-10618 这道题目题意很复杂,代码也是参考了别人的,因为自己实在是写不出.d[i][a][b][s]表示分析到第i个箭头时,此时左脚处于 ...

  6. UVa 1149 装箱

    https://vjudge.net/problem/UVA-1149 题意:给定N个物品的重量和背包的容量,同时要求每个背包最多装两个物品.求至少需要的背包数. 思路:很简单的贪心.每次将最轻的和最 ...

  7. Myeclipse中xml文件里自动提示消失解决办法

    IED Eclipse Java EE IDE for Web Developers:DTD 类型约束文件    1. Window->Preferences->XML->XML C ...

  8. python计算结果显示小数

    先将整型转换成float型,在计算,结果就有小数了 >>> a = >>> b = >>> c = a/b >>> a,b,c ...

  9. ubuntu14.04, libtinyxml.so.2.6.2: cannot open shared object file: No such file or directory

    打包/opt/ros 打包项目文件install 到一台没有安装ros环境的机器上启动项目 source ros/indigo/setup.bash source install/setup.bash ...

  10. 卸载 mysql

    sudo apt-get remove mysql-* dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P 之后会跳出一个弹框点击“是”就行了