美文网首页
xcode消除警告

xcode消除警告

作者: 贼海鸥 | 来源:发表于2017-08-18 11:54 被阅读0次

    本人有一点小小的强迫症,那就是,项目中,不想看到警告.没办法的是,技术不行,只能一点一点的积累了.这个会长期更新.碰到,警告了,我就会加上.里面的解决办法大部分来源于网友.


    1.: Directory not found for option '-L/***/Lib/ShareSDK/Support/PlatformSDK/SinaWeiboSDK'
    解决办法:
    在build settings中找到search paths和Library Search Paths这两个,然后对照警告的文件,选择删除就可以了

    图片.png

    2.The image set name "lineright" is used by multiple image sets.
    解决办法:
    这个一般情况是在Assets中的图片,名字重复了,找到,修改一下就好了

    3.The file "search.png" for the image set "search" does not exist.
    原因: png图像文件拷贝失败,看看信息上面提示Can't find哪个文件,一般都是从文件系统里删除文件而没有通过Xcode删除造成的,Xcode的项目配置文件依然纪录着这个文件的引用
    解决办法:
    在Assets中找到这个文件,然后,show in finder,打开json文件,删除里面不存在文件,比如你没有search@.png文件,json上面有,他就会报警告,删了就好了.

    4.file:///Users/liuhuaixuan/Desktop/51tsg/YaaLv/Assets.xcassets/lineright/Contents.json: warning: Missing file: /Users/liuhuaixuan/Desktop/51tsg/YaaLv/Assets.xcassets/lineright/Contents.json is missing from working copy
    解决办法:
    Xcode->Preferences->Source->Enable Source Control 勾勾去掉

    5.Auto property synthesis will not synthesize property 'title'; it will be implemented by its superclass, use @dynamic to acknowledge intention
    解决办法:
    这个表示,你命名的变量或者方法与系统的重合了,改一下,就好了

    6.'interfaceOrientation' is deprecated: first deprecated in iOS 8.0
    解决办法:
    (UIInterfaceOrientationIsPortrait(self.interfaceOrientation))中的self.interfaceOrientation更换为[[UIApplication sharedApplication] statusBarOrientation]就好了

    相关文章

      网友评论

          本文标题:xcode消除警告

          本文链接:https://www.haomeiwen.com/subject/amborxtx.html