我在某些用户计算机上看到我的React Native应用程序崩溃了。似乎使用这样的样式会导致FormatExcpetion:
StyleSheet.create({login: { margin: "7.8%"}});
答案 0 :(得分:0)
事实证明,当机器/ AppDomain的语言环境使用逗号代替句点时,它来自float.Parse()。您需要将CultureInfo.InvariantCulture添加到float.Parse以覆盖。
react-native-windows中的修复程序已合并(但未发布): https://github.com/Microsoft/react-native-windows/pull/1855