代码环境:
RN: 0.44+
Xcode 9.3

打包时会报下面几种错误:
/node_modules/react-native/Libraries/Image/RCTImageCache.m:28:55: Enum values with underlying type ‘NSInteger’ should not be used as format arguments; add an explicit cast to ‘long’ instead
Xcode9.3 React-Native(RN) build 打包报错

Xcode9.3 React-Native(RN) build 打包报错


针对上述问题,解决方案有3种:
1.Xcode降级到8.3;
2.将RN版本升级到最高;
3.手动fixed问题: %zd 替换为 %ld ; eventLag 替换为 (long)eventLag

return [NSString stringWithFormat:@”%@|%g|%g|%g|%ld|%@”,
imageTag, size.width, size.height, scale, (long)resizeMode, responseDate];

RCTLogWarn(@”Native TextInput(%@) is %ld events ahead of JS - try to make your JS faster.”, self.text, (long)eventLag);

相关文章:

  • 2021-12-15
  • 2022-01-02
  • 2021-07-25
  • 2021-11-01
  • 2021-09-03
  • 2022-12-23
  • 2021-07-11
  • 2021-04-10
猜你喜欢
  • 2022-02-02
  • 2021-12-31
  • 2021-06-10
  • 2021-08-19
  • 2021-07-28
  • 2021-05-31
  • 2021-12-15
相关资源
相似解决方案