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 ...
随机推荐
- React篇-报错信息:warning: Can't call setState (or forceUpdate) on an unmounted component.
报错信息是: Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but ...
- boost生成json中的put操作
ptree中的put操作后可以加<>,指定类型,不加<>采用默认的类型,感觉不加反而更好用.用法见下面例子. #include <iostream> #includ ...
- axios的使用
一.首先要安装axios npm install axios 使用: -先在main中配置: import axios from 'axios' //要把axios放进一个全局变量中 //把axios ...
- ES7 async 函数
async 函数 let getdata=function(){ return new Promise((resolve,reject)=>{ resolve('aaa'); }) } let ...
- 异常:分为 严重性错误:Error 异常:Exception
异常:是在运行时期发生的不正常情况.在java中用类的形式对不正常情况进行了描述和封装对象描述不正常的情况的类,就称为异常类以前:正常流程代码和问题处理代码相结合现在将正常流程代码和问题处理代码分离, ...
- 282A
#include <iostream> #include <string> using namespace std; int main() { int n, plus, sub ...
- (转)redis分布式锁-SETNX实现
Redis有一系列的命令,特点是以NX结尾,NX是Not eXists的缩写,如SETNX命令就应该理解为:SET if Not eXists.这系列的命令非常有用,这里讲使用SETNX来实现分布式锁 ...
- CentOS安装pycharm
1.官网下载包 2.Linux下解压 3.进入bin目录 4.赋权:chmod +x pycharm.sh 5.安装:./pycharm.sh 6.添加链接:ln -s /home/pycharm/p ...
- es6 数组..... ==和===的区别 es6的递归方式 es6find函数 timer setTimeout v-html的用法,-
相当于push了 find函数来找到某个值 如果新建一个 setTimeout 的timer 首先得清除这个timer. v-html用法之一就是加载后台传过来的模板
- [LeetCode] 367. Valid Perfect Square_Easy tag:Math
Given a positive integer num, write a function which returns True if num is a perfect square else Fa ...