自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Xcode編譯錯(cuò)誤和警告匯總

移動(dòng)開(kāi)發(fā) iOS
你還在為Xcode報(bào)錯(cuò)或警告時(shí)手足無(wú)措,摸不著頭腦么?看完本篇文章一定會(huì)對(duì)你有一些幫助,本文寫(xiě)出了幾種常見(jiàn)的Xcode編譯錯(cuò)誤和警告匯總。

 

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

原因: 因?yàn)槟闩K了預(yù)處理器宏,在它處于<Multiple Values>的時(shí)候修改了它

解決方法: Configiration選擇All Configirations,清空它 然后分別重新定義你的Debug,Release,Distributin預(yù)處理器宏吧

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哪個(gè)文件,一般都是從文件系統(tǒng)里刪除文件而沒(méi)有通過(guò)Xcode刪除造成的,Xcode的項(xiàng)目配置文件依然紀(jì)錄著這個(gè)文件的引用

解決辦法: 給文件系統(tǒng)里增加相應(yīng)的文件,或者從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

原因: 簽名錯(cuò)誤

解決辦法: Target -> Get Info -> Build -> Code Signing -> 修改簽名

記得左上角的Configuration類型要跟當(dāng)前Build類型對(duì)應(yīng)(Debug, Release, Distribution),否則改了也白改

5、could not create bundle folder for versioned model *.moda(好像是這個(gè)后綴名的這個(gè)文件)

原因:編譯一次會(huì)產(chǎn)生一個(gè)新的

解決辦法:應(yīng)該把編譯產(chǎn)生出來(lái)的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方法規(guī)則:方法返回id,并且名字以init     +大寫(xiě)字母開(kāi)頭+其他  為準(zhǔn)則。例如:- (id) initWithXXX;

出錯(cuò)代碼:- (id) Myinit{

  self = [super init];

  ……

}

解決方法:- (id) initWithMy

{

  self = [super init];

}

 

責(zé)任編輯:閆佳明 來(lái)源: sina
相關(guān)推薦

2010-09-17 08:40:49

JAVA編譯錯(cuò)誤

2011-07-04 10:56:10

Qt 移植 編譯

2014-08-05 10:51:09

Xcode警告Objective-C

2013-04-03 13:43:22

iOS開(kāi)發(fā)Xcode屏蔽源文件編

2025-04-02 07:59:15

2011-07-20 16:43:33

iPhone Bug Xcode

2009-04-03 14:50:01

微軟Windows 7錯(cuò)誤

2021-09-06 11:26:23

Linux 5.15內(nèi)核編譯器

2011-08-01 10:41:59

Xcode 條件編譯

2013-07-04 15:05:14

Android

2012-03-26 14:25:34

C++

2011-07-25 16:03:47

XCode 編譯

2010-07-29 14:18:57

Flex編譯器參數(shù)

2022-04-15 19:28:31

漏洞網(wǎng)絡(luò)攻擊Windows

2011-08-01 09:34:32

Xcode Xcode 4 編譯器

2009-11-30 17:16:13

openSUSE 11

2011-07-28 14:06:52

XCode XCode 3.2

2011-08-03 14:06:30

Xcode 4 安裝

2011-07-22 18:25:20

XCode iPhone SDK

2012-03-21 09:40:02

C#
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)