iOS开发笔记之四十——一个诡异的编译报错问题

来源:互联网 发布:化学反应速率实验数据 编辑:程序博客网 时间:2024/06/10 20:16

1、工程代码在自己本地编译运行都没问题,但是采用公司的jenkins打包是,就会提示一个报错,报错信息如下:

The following build commands failed:
CompileC Build/Intermediates/Nova.build/AdHocForQA-iphoneos/Nova.build/Objects-normal/armv7/MyViewController.o Project/Controller/MyViewController.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

在这种情况下,一般都是报错类的问题。经过排查还是由于自己MyViewController.m类中修改导致,在这个类中有个int转string的使用,如下:

NSString *utm = [[NSString alloc] initWithFormat:@"%ld",indexPath.row];

改为如下:

NSString *utm = [NSString stringWithFormat:@"%@", (@(indexPath.row))]


参考链接:

http://www.cocoachina.com/bbs/read.php?tid=265522

0 0