iOS项目之报错笔记
问题一:
linker command failed with exit code 1 (use -vto see invocation)
原因:导入了.m的头文件,导致同时有两个一样的.m文件在编译
问题二:
Xcode真机测试报错:Could not launch “xxx”
解决方案一:1.删除/Users/(用户名)/Library/Developer/Xcode/DerivedData/(对应APP程序)文件夹
2.拔掉手机,删除对应的APP程序,完全退出Xcode工具
3.重新连接手机进行真机测试
解决方案二:进行过真机抓包测试,关闭HTTP代理
解决方案三:1.选择手机中“设置” -> “通用” -> “设备管理” -> 选择自己对应的开发商应用 -> “删除应用”
2.重新运行Xcode中的程序,这个时候应该还会报错
3.再次进入自己对应的开发商应用 -> “验证应用”
4.再次运行Xcode中的程序就OK了
情况二:

xcode为11+

分析原因:
在网上找了很多关于Could not launch "xxx"的原因,都没有解决自己的问题,然后自己进行检查配置时,发现了证书配置问题,修改证书后,就没有再出现这样的问题了,于是把这个记录一下。
解决方案:

这里根据自己的环境配置对应的证书。
情况三:

解决方案:在下载一些第三方demo时,运行到真机上会出现这样的提示信息,需要在“设置” -> “通用” -> “设备管理”-> 点击信任
问题三:
Warning! ivar size mismatch in PSUICollectionView_ of 80 bytes - can't change the superclass.
解决:1.搜索PSUICollectionView,找到.m文件
2.搜索char filler,在[]中的数据上加上警告提示的数据
问题四:
***Terminating app due to uncaught exception '...', reason:'[<...> setValue:forUndefinedKey:]:this class is not key value coding-compliant for the key ....'
问题原因:xib中连线出问题
问题五:
***Terminating app due to uncaught exception '...', reason:'-[... ...]:unrecognized selector sent to instance ...'
问题原因:某个对象没有实现某个方法
问题六:
iOS国际化时遇到的错误:read failed: the data couldn't be read because it isn't in the correct format.
问题原因:在国际化的时候,写key,写着写着就忘了加 ";"
问题七:
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [187.5 nan]'
问题原因:某个控件在设置CGRect类型的属性(如frame、bounds、......)中宽高设置了0,导致程序在计算中除以了0。
问题八:
Xcode意外闪退,错误信息:
Process: Xcode []
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 8.2. (11766.1) Date/Time: -- ::38.076 +
OS Version: Mac OS X 10.12. (16D32)
Report Version: Time Awake Since Boot: seconds System Integrity Protection: enabled Crashed Thread: Dispatch queue: com.apple.main-thread Application Specific Information:
ProductBuildVersion: 8C1002
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Error getting value for key 'strategyClass' of extension 'KSImageNamed.CompletionStrategy.ImageNamed' in plug-in 'com.ksuther.KSImageNamed'
UserInfo: {
......
}
Hints: None
解决问题:找到/Users/(用户名)/Library/Developer/Xcode/Plug-ins文件夹,将里面的KSImageNamed.ideplugin插件删除,重启Xcode。
问题九:Warning:whose view is not in the window hierarchy!
分析:可能在界面完全退出之前,进行展示信息界面(如Alert)。
解决:修改调用的顺序,在界面退出之后在展示。
问题十:
The behavior of the UICollectionViewFlowLayout is not defined because:
the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
分析:automaticallyAdjustsScrollViewInsets根据按所在界面的status bar,navigationbar,与tabbar的高度,自动调整scrollview的 inset
解决:在viewDidLoad方法中添加 self.automaticallyAdjustsScrollViewInsets = NO;
问题十一:
linker command failed with exit code 1 (use -v to see invocation)

分析:在项目中使用了第三方,但没有被添加到编译列表中
解决:项目 -> TARGETS -> Build Phases -> Compile Sources,点击 + 号进行添加对应的 .m文件
iOS项目之报错笔记的更多相关文章
- javascript的倒计时功能中newData().getTime()在iOS下会报错问题解决
javascript的倒计时功能中newData().getTime()在iOS下会报错问题解决 在做移动端时间转化为时间戳时,遇到了一个问题,安卓手机上访问时,能拿到时间戳,从而正确转换时间,而在i ...
- 【转】 IOS开发xcode报错之has been modified since the precompiled header was built
本文转载自 IOS开发xcode报错之has been modified since the precompiled header was built 其实我是升级xcode到4.6.3的时候遇到的 ...
- Dynamics AX 2012 R2 切换环境后项目导入报错
Reinhard重装了服务器.重装后,导入项目A报错,错误提示如下: A table, Extended Data Type, Base Enum or class called ???? a ...
- IOS开发 xcode报错之has been modified since the precompiled header was built
转载的文章 很实用 IOS开发xcode报错之has been modified since the precompiled header was built 今天做百度地图的时候第一次发现下面错误 ...
- eclipse 中导入 maven项目 启动报错
导入Maven项目到Eclipse中时,出现问题如下: java.lang.ClassNotFoundException: org.springframework.web.context.Contex ...
- eclipse项目无故报错,markers信息为An error occurred while filtering resources
eclipse项目无故报错,markers信息为An error occurred while filtering resources 描述:eclipse项目和resource文件上有红色的叉,其m ...
- tomcat项目启动报错java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration……
周一上班启动项目,报错如图: 看到网上说的原因,有jar包冲突造成的,我这里的是: 情况:console打印信息有多次连接数据库,但该项目只需要连接一个库.再仔细看,发现有其他项目的信息,打开tomc ...
- Linux下Tomcat项目启动报错
Linux下Tomcat项目启动报错 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading cla ...
- Eureka Server项目启动报错处理
Eureka Server项目启动报错处理 Eureka是一个服务发现组件,提供服务注册.发现等注册中心功能,使用spring boot启动eureka应用时出现报错: 20:36:17.646 [r ...
随机推荐
- oracle sql 游标的简单用法(tip:sql中两个单引号表示一个单引号)
--游标遍历某个字段 (打印出来) declare res_sql varchar2(2000); cursor cur is select f_dcnam ...
- Java中基本数据类型byte,short,char,int,long,float,double 取值范围
部分内容转自:java 彻底理解 byte char short int float long double 首先说byte: 这段是摘自jdk中 Byte.java中的源代码: /** * A co ...
- EOS 帐户权限操作--你找不到的干货 (原创) 续集-EOS 3.0
https://eosfans.io/topics/372 关于2.0权限问题请移步https://eosfans.io/topics/28 目录 查看权限 改变权限 增加权限 删除权限 查看权限 有 ...
- javascript封装animate动画
面向对象式: Element.prototype.animate=animate; Element.prototype.getStyle=getStyle; function animate(json ...
- 关于PHP将对象数据写入日志的问题
有时候在调试项目的时候,需要将一个对象或者对象的实例记录下来观察数据,如果用json_encode可能拿到的是空数据, 此时,改为使用 $data = print_r($data,1); 然后将 $d ...
- js同时获得数组的两个最小值
//数组中找两个最小值,及索引 //例如数组: [2,6,7,4,10,3,5]; 计算得出,min1=2,index1=0,min2=3,index2=5; var min1 = Infinity; ...
- itemscope itemtype="http://schema.org/AggregateRating"
Review Canonical URL: http://schema.org/Review Thing > CreativeWork > Review A review of an it ...
- Linux:系统文件目录
目录结构 bin:命令类目录 命令 系统操作 清屏:clear.ctrl+L 进程: # $(ps -ef | grep hnlinux) //方法一 过滤出hnlinux用户进程 #kill -u ...
- Python基础(三)Mysql数据库安装及使用
在python下使用mysql需要: 1.安装mysql 2.安装python pymysql包(pymysql包支持py3 跟mysqldb用法差不多) 一.安装mysql mysql下载地址:h ...
- Linux 7.x 设置主机名称
Linux 7.x 设置主机名称 在Linux7.x 版本中,临时设置主机名称使用指令:hostnamectrl set-name 主机名称 [root@localhost ~]# hostname ...