一,libxml/HTMLparser.h file not findphp
第一种方法:
点击左边项目的根目录,再点击右边的Build Settings,手工输入文字:“Header search paths”,而后单击(或双击,点击弹出面板下面的“+”号进行添加)“Header search paths ”右边的空白处,输入:/usr/include/libxml2
第二种方法:
点击左边项目的根目录,再点击右边的Build Settings,手工输入文字:“Header search paths”,而后单击(或双击,点击弹出面板下面的“+”号进行添加)“ Header search paths ”右边的空白处,输入:${SDK_DIR}/usr/include/libxml2
html
二,老是找不到协议:ios
第一种方法:没有引入该协议,引入该协议web
第二种方法:重复引入该协议,重复引入的地方删除bootstrap
三,启动画面不显示swift
1>,图片大小尺寸必须符合规定,把全部的图片导入工程中xcode
2>,进入工程Images.xcassets文件夹,把图片拖入对应的AppIcon,LaungchImageapp
四,ld: library not found for -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
第一种方法:库crypto没有添加进Link Binary With Libraries,添加进去就OK了
第二种方法:库crypto已经添加进Link Binary With Libraries,把crypto删除再从新添加进去就OK了ide
五,Unsupported compiler 'com.apple.compilers.llvmgcc42' selected for architecture 'armv7' Xcode 5函数
Change your compiler for C/C++/ObjectiveC Go to Build Settings->Build OPtions->compiler for C/C++/ObjectiveC; select Default(Apple LLVM5.0)
六,关于ld: file is universal (2 slices) but does not contain a(n) armv7s slice
升级了xcode以后,支持iOS6和iPhone5,不过Build项目的时候,出现了标题所示错误提示信息。
缘由是引用的第三方库致使了这个连接错误。
解决办法有三个,随便哪一种都能解决:
1.升级涉及到的.a文件
2.在target的Build Settings里面,将Build Active Architecture Only改为YES (I choose this)
3.在target的Build Settings里面,找到Valid Architectures,删除其中的armv7s
因此仍是以为,若是是开源库,直接把源代码包含进项目比较靠谱。
七,使用第三方插件时,出现contentoffset下移20像素的状况:
解决方案:在使用第三方控件的viewcontroller的viewDidLoad方法中添加下面的代码便可
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
[self setEdgesForExtendedLayout:UIRectEdgeNone];
}
八,提交app的时候会有no indentities were available for signing 提示
1.在Xcode的Organizer 中能够看到你上传项目的Indetifier
2,在Provisioning中能够创建的文件和Indetifier保持一致
3,下载你所创建的Provisioning文件,而后双击
4,再在Organizer中上传文件就能够了
5,若是在代码中做了修改,须要从新打包再上传,上传的才会是最新的代码
九,no matching provisioning profiles found
1,到Build Settings里面从新选择进入code signing
2,从新选择profiles
十. mutating method sent to immutable object'
从字面上理解:可变的消息发给了不可变的对象。好比NSDictionary类型的对象调用setValue方法.应该把NSDictionary 改为NSMutableDictionary类型。
十一.Local declaration of 'content' hides instance variable
通常是函数里面定义的变量和class属性变量重名了。不多有和系统变量重名的状况
十二.unrecognized selector sent to instance
大部分状况下是由于对象被提早release了,在不但愿他release的状况下,指针还在,对象已经不在了
不少时候,是由于init初始化函数中,对属性赋值没有使用self.foo赋值,而是直接对foo赋值,致使属性对象没有retain(内心觉得retain了),而提早释放。
十三.使用ASIHTTPRequest编译不经过
缘由是一些类库没有加进去。把这些库加进去CFNetwork, SystemConfiguration, MobileCoreServices, and libz.dylib
十四.添加在UIView中的UIButton 单击不起做用
缘由是UIbutton的frame超出了UIView的frame范围。事实上UIView并无设置frame,设置完后( 范围必定要在UIButton以外),UIButton单击就能够了
十五.当使用presentViewController和dismissPresentViewController时,若是报这个错 : while presentation is in progress
修改方法为[mainView dismissModalViewControllerAnimated:NO]; 将参数Animated改成NO;若是报这个错while a presentation or dismiss is in progress,试试这样
if (![[mainView modalViewController] isBeingDismissed]) {
[mainView dismissModalViewControllerAnimated:NO];
}
十六.调用系统相册的时候,很是容易出现内存警告,加入绿色代码就会好点:
UIImagePickerController * picker = [[UIImagePickerController alloc]init];
picker.delegate = self;
picker.allowsEditing = NO; //是否可编辑
picker.videoQuality=UIImagePickerControllerQualityTypeLow;
//摄像头
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:picker animated:YES];
[picker release];
十七.ios开发者都碰见过得错误:EXC_BAD_ACCESS 。这个和第二个比较相似。一般的调试方法就是加入NSZombieEnabled变量,加入方法自行百度。
而且开发过程当中使用[[NSNotificationCenterdefaultCenter]
来发布本地消息,这个也常常会出现EXC_BAD_ACCESS错误。这个时候只须要在你的view活着viewControllers的dealloc的方法里面加入
[[NSNotificationCenterdefaultCenter]removeObserver:selfname:@"yourNotification"object:nil];就ok了
十八.碰见一个蛋疼的问题"linker command failed with exit code 1 (use -v to see invocation)" 。
翻遍了找不到缘由。而后还有这样的警告duplicate symbol _OBJC_CLASS 。原来是在导入某个类的时候导入.m文件,而不是.h文件
十九:clang failed with exit code 254
检测代码中 是否 有 NSLog 打印了 返回 void 的值.
二十:Verify exit code of build task with internal identifier 'CopyPNGFile 123.png'


一:将出错的png,用PhotoShZ喎�"http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcNbY0MLXqru70ru0ziwgIMjnuftQaG90b1Nob3C08rK7v6osuMS689e6zqpKcGcgytTK1C4g16q7u8qxLMfryrnTwyA6PHN0cm9uZz605rSizqpXZWK78snosbjL+cq508O1xCYjMjY2ODQ7yr08L3N0cm9uZz4mIzI2Njg0O8q916q7u7PJPHN0cm9uZz4gUE5HLTI0PC9zdHJvbmc+1eLR+bXEzbzGrLTz0KGxyL3Pus/KyjwvcD4KPHA+Cjxicj4KPC9wPgo8cD4KPHN0cm9uZz4zOjwvc3Ryb25nPjwvcD4KPHA+CjxpbWcgc3JjPQ=="http://www.2cto.com/uploadfile/2014/0509/20140509112551421.png" alt="\">
一:肯定静态库中是否有自定义的类文件,若是一个也没有,就会出现这种错误,这也是为何新建的静态库都包含一个默认的类.
二十一: _OBJC_CLASS_$_UIMainKpiXML", referenced from:
1:检测类文件是否已经指定了Project Target


2:检测类文件是否在Bulid Phases 中的 Compile Source 是否包含了这个类文件


以上两步都检查完成之后,若是编译还报错误,请尝试完全关闭XCode 再次编译试试.
二十二: for architecture armv7s

如下摘自: http://stackoverflow.com/questions/12570116/what-is-the-difference-between-arm7-and-arm7s
Yes you are right about armv7s is about the iPhone 5. Here some summary info I found on the web:
- ARMv6 ISA (used by the ARM11 core in the iPhone 2G and iPhone 3G)
- ARMv7 (used by modern ARM cores, iPhone 3GS, iPhone 4 and 4S)
- ARMv7s (new A6 SoC for iPhone 5).
注:错误含义表示 指定的framework 不支持对 armv7s 的支持, 也就不支持搭载A6处理器的iPhone 5.
若是在编译framework或者静态库的工程中依旧编译时,多是如下设置致使,设置为NO便可

二十三: Local declaration of "' hides instance variable
私有变量与属性变量同名所致
二十四:Instance variable '' accessed in class method


1:在静态方法不能使用到类的属性变量,不然就报上面的错误
二十五:ld: symbol(s) not found for architecture i386

1:里面意思说:"_stroyboard" 这个属性在目标类中 根本就没声明!

那就声明一下咯? 注:XCode4.5 会默认声明了,可是只是针对自定义类,系统类尚未. 因此,当心
@synthesize storyboard;
二十六:PerformSelector may cause a leak because its selector is unknow
经过以下代码解决产生的编译器警告
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
[self performSelector:nextView];
#pragma clang diagnostic pop
来源:(http://www.ooso.net/archives/620)
二十七:unable to open executable
1:检测同一个静态库或工程中是否有两个或以上的想同类文件存在
2:删除模拟器中的应用,删除DerivedData文件夹 从新启动XCode.
二十八: Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
不要在头文件声明变量命名是以new copy开头
参考:http://kongbei888.blog.163.com/blog/static/24326613201261902510652/
二十九:ld: file not found:
1:指向的静态库没有找到

三十: _utf8_countTrailBytes
add library libicucore.dylib
三十一:Stray "@" in program
工程使用的编译器版本太低所致. 修改编译器版本至最新版本,以下图:


参考:http://stackoverflow.com/questions/12821938/stray-in-program-with-nsdictionary-definition
三十二.解决真机调试iPad Air设备时的错误:architecture not supported的办法
1.将Build Settings 中Architectures ——> Valid Architectures的arm64删掉,只留armv七、armv7s
2.同上,将Architectures ——>Architectures改成 $(ARHS_STANDARD)armv7,armv7s
3.把Build Active Architecture Only 改成NO
4.编译便可
三十三.编译时出现:Not supported ARM architecture
解决办法:在./configure 时加入 -D__ARM_ARCH_5TEJ__
三十四.Couldn"t register xxx.xx.xx with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.
每一个在xcode下用ios模拟器作开发的开发者都应该会遇到过上面所示的错误,目前找到最行之有效的解决办法是重启手机。不行了也顺便把电脑重启下。 建议之后记得stop就好了 不要正运行着就直接卸载了程序
三十五.duplicate symbol _protobuf_c buffer_simple_append in ...错误解决
选中工程,target,切换到buildsetting标签,定位到other link flag,
输入: 去除-all_load,便可
三十六.ld: symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o for architectur
错误:ld: symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o for architecture i386
缘由:不支持低版本的系统如3.0
解决:Deployment Target was 3.0. Changing it to 4.3 fixed it.
三十七.当一个tableViewCell被选中的时候,改变一个button的title,这个button有背景图片,改变title不成功
把该button的selected设为NO
三十八.CUICatalog: Invalid asset name supplied: , or invalid scale factor: 2.000000
这个提示的意思是说你用了这个方法
[UIImage imageNamed:name];可是这个name倒是空的,因此就报了这个错了。
解决方法,在项目中搜索[UIImage imageNamed:,而后打印看看所谓的name是否为空。找到后替换。
三十九.XCode开发遇到的“Could not inspect the application package”解决方案
出现这种状况的缘由是:项目里含有 Resources 文件夹。解决方案:
1>在项目里把这个 Resources 文件夹 改成别的名字(不要在项目里改文件夹的名字,这是伪改,要进入工程文件夹再改 Resources 名字),再从新引入这个文件夹
2>按住 option 键 ,点击 Xcode 的product 菜单,选中 Clean Build Folder ,而后肯定 clean 就OK了
四十.Xcode has encountered an unexpected error (0xC002)
解决方法
Xcode has encountered an unexpected error (0xC002) No such file or directory, at ‘/SourceCache/DTDeviceKit/DTDeviceKit-867/DTDeviceKit/DTDeviceKit_Utilities.m:864’
Xcode has encountered an unexpected error (0xC002) No such file or directory, at ‘/SourceCache/DTDeviceKit/DTDeviceKit-867/DTDeviceKit/DTDeviceKit_Utilities.m:864’
cd ~/Library/Developer/Xcode/iOS\ DeviceSupport/4.2.1\ \(8C148\)/Symbols/System/Library/Caches/com.apple.dyld/
touch .copied_dyld_shared_cache_armv6
touch .processed_dyld_shared_cache_armv6
touch dyld_shared_cache_armv6
有些多是
touch .copied_dyld_shared_cache_armv6
touch .processed_dyld_shared_cache_armv6
touch dyld_shared_cache_armv6
四十一.An error was encountered while running(Domain=LaunchSerivcesError, Code=0)
解决方案:重置模拟器
四十二.Undefined symbols for architecture i386:
"_NSFileTypeForHFSTypeCode", referenced from:
-[FMDatabase(FMDatabaseAdditions) applicationIDString] in FMDatabaseAdditions.o
"_NSHFSTypeCodeFromFileType", referenced from:
-[FMDatabase(FMDatabaseAdditions) setApplicationIDString:] in FMDatabaseAdditions.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决办法:把FMDatabase文件删除了,再从新导入全部的文件
四十三.fatal error: malformed or corrupted AST file: 'Unable to load module "/Users/xxx/Library/Developer/Xcode/DerivedData/ModuleCache/XYZYIE6ZV0OP/Darwin.pcm": file not found' note: after modifying system headers, please delete the module cache at '/Users/me/Library/Developer/Xcode/DerivedData/ModuleCache/XYZYIE6ZV0OP' 1 error generated.
解决办法:
只须要清除继承数据文件夹便可。具体操做为:进入XCode的Window,选择Organizer->Projects,而后选择出现问题的 project ,点击delete button删除Derived data.
从新编译项目,便可。
四十四.Command /usr/bin/codesign failed with exit code 1
进入xcode 的偏好设置 -》Account以下图

点击第二张图右下角的刷新按钮,从新编译打包,就OK了
四十四.the ipa is invalid.it does not include a payload directory
须要在info-plist 文件中 添加或者修改 LSRequiresIPhoneOS value 为 YES
四十四.iOS9 beta 请求出现App Transport Security has blocked a cleartext HTTP (http://)
错误描述:
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app‘s Info.plist file.
在iOS9 beta中,苹果将原http协议改为了https协议,使用 TLS1.2 SSL加密请求数据。
解决方法:
在info.plist 加入key
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
四十五.Could not find Developer Disk Image
真机系统过高,Xcode支持不到这个系统,要有这个系统版本的镜像文件 ,/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport ,会列出支持的设备,而后在网上下载对应的文件
四十六.UICollectionView 会在APP再次打开时下沉64像素
方案一:在Storyboard中取消勾选Controller的Adjust Scroll View Insets。或者
self.automaticallyAdjustsScrollViewInsets = NO;
方案二:
self.edgesForExtendedLayout = UIRectEdgeNone;
四十六.dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/AC4B5FD7-43B3-4743-9682-60A026C5CAE2/NewFoodiPad.app/NewFoodiPad
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode
四十七.swift项目 ios8系统 SVProgressHud crash在 self.hudView.motionEffects = @[];
self.hudView.motionEffects = [NSArray array];
四十八.swift项目 ios8 dyld: Symbol not found: ___NSArray0__
dyld: Symbol not found: ___NSArray0__
Referenced from: /private/var/mobile/Containers/Bundle/Application/5C6F5D69-5D14-4C07-BEA4-F410C18C66CC/DGBao.app/DGBao
Expected in: /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /private/var/mobile/Containers/Bundle/Application/5C6F5D69-5D14-4C07-BEA4-F410C18C66CC/DGBao.app/DGBao
解决办法:

改成 optinal
四十九.The maximum number of apps for free development profiles has been reached.
免费应用程序调试最大限度
苹果免费App ID只能运行2个应用程序,当调试第三个的时候就会报这个错误,咱们必须把以前的应用程序删除,就能够调试新的了
五十.“(null)” is of a model that is not supported by this version of Xcode.
今天真机运行遇见了这个问题(“(null)” is of a model that is not supported by this version of Xcode. Ple),发现将XCode重启后就能够真机运行了,遇见这个问题的朋友能够试下