本文主要是介绍Xcode9.3 React-Native(RN) build 打包报错,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
代码环境:
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
针对上述问题,解决方案有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);
这篇关于Xcode9.3 React-Native(RN) build 打包报错的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!