React常见问题:error: property 'badgeColor' not found on object of type 'UITabBarItem *

错误提示:
/Users/gavin/Documents/react/ofodemo/node_modules/react-native/React/Views/RCTTabBarItem.m:111:41: warning: undeclared selector 'badgeColor' [-Wundeclared-selector]

  if ([self.barItem respondsToSelector:@selector(badgeColor)]) {

                                        ^

/Users/gavin/Documents/react/ofodemo/node_modules/react-native/React/Views/RCTTabBarItem.m:112:18: error: property 'badgeColor' not found on object of type 'UITabBarItem *'

    self.barItem.badgeColor = badgeColor;

                 ^

1 warning and 1 error generated.

** BUILD FAILED **

解决方法,你的xcode版本过旧,需要升级。

参考文章:https://github.com/facebook/react-native/issues/14512

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1. 周六,一早起来,便到露台寻花,因为天气爆热,近期又没有下雨,水分不够,露台上的茉莉花、金银花、玉兰花都只是含...
    文晓玲阅读 470评论 2 5
  • 时光荏苒,弹指一挥间,当年在学校读书的时候,几个好朋友三五成群的组队逛街,吃串串,现在只剩一人。拿着比脸还大的串串...
    wxl画画阅读 533评论 0 2
  • 相关解释来自这里 原文答案:If you turned your camera properly when tak...
    valentizx阅读 4,192评论 6 1
  • 假如, 我是一只小鸟, 我就可以在天空中自由的飞翔, 那么,我就可以看遍祖国的大好河山。 假如, 我是一只小鸟, ...
    小润泽阅读 476评论 0 22