ios - ReactNative,应用程序在模拟器上运行,但不在真正的 iPhone 上
问题描述
我正在尝试在 iOS 上运行具有本机反应的应用程序。构建是正确的,但是当我运行它时,它显示启动屏幕,然后保持全白,xcode 向我抛出此错误:
libsystem_kernel.dylib`__pthread_kill:
0x1dac070fc <+0>: mov x16, #0x148
0x1dac07100 <+4>: svc #0x80
-> 0x1dac07104 <+8>: b.lo 0x1dac0711c ; <+32>
0x1dac07108 <+12>: stp x29, x30, [sp, #-0x10]!
0x1dac0710c <+16>: mov x29, sp
0x1dac07110 <+20>: bl 0x1dabfc7d4 ; cerror_nocancel
0x1dac07114 <+24>: mov sp, x29
0x1dac07118 <+28>: ldp x29, x30, [sp], #0x10
0x1dac0711c <+32>: ret
(这里有“->”的行有一个错误:Thread 6: signal SIGABRT
,但每次构建都会改变)
和:
2019-08-23 16:39:38.264 [error][tid:com.facebook.react.JavaScript] `View` has no propType for native prop `RCTView.borderTopEndRadius` of native type `CGFloat`
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.
2019-08-23 16:39:38.267586+0200 RFM[321:14377] `View` has no propType for native prop `RCTView.borderTopEndRadius` of native type `CGFloat`
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.
2019-08-23 16:39:38.278 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: `View` has no propType for native prop `RCTView.borderTopEndRadius` of native type `CGFloat`
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.
2019-08-23 16:39:38.278257+0200 RFM[321:14372] Unhandled JS Exception: `View` has no propType for native prop `RCTView.borderTopEndRadius` of native type `CGFloat`
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.
2019-08-23 16:39:38.294345+0200 RFM[321:14372] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: `View` has no propType for native prop `RCTView.borderTopEndRadius` of native type `CGFloat`
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.', reason: 'Unhandled JS Exception: `View` has no propType for native prop `RCTView.borderTopEndRadius` of native type `CGFloat`
If you haven't changed this prop yourself, this usually me..., stack:
verifyPropTypes@26162:22
requireNativeComponent@25498:42
<unknown>@24136:37
loadModuleImplementation@115:12
<unknown>@34748:19
loadModuleImplementation@115:12
<unknown>@34524:24
loadModuleImplementation@115:12
<unknown>@58847:30
loadModuleImplementation@115:12
<unknown>@58500:21
loadModuleImplementation@115:12
<unknown>@58425:23
loadModuleImplementation@115:12
<unknown>@58038:37
loadModuleImplementation@115:12
<unknown>@55269:22
loadModuleImplementation@115:12
<unknown>@1254:19
loadModuleImplementation@115:12
guardedLoadModule@72:45
global code@141506:9
'
*** First throw call stack:
(0x1db070ec4 0x1da241a40 0x1016f28c8 0x1016ee6ec 0x1db078630 0x1daf56450 0x1daf57034 0x101706c34 0x101748b80 0x1017488e0 0x101f9b824 0x101f9cdc8 0x101fa4e6c 0x101fa5b60 0x101fafbfc 0x1dac8d0dc 0x1dac8fcec)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
我有“react”:“16.8.3”和“react-native”:“^0.59.9”。我已经尝试重新启动程序包、清除缓存、重新安装、关闭/打开终端、xcode 等,正如我在一些问题中看到的那样,但没有一个有效。
问题是它在模拟器上正确运行,一些同事在相同的干净 git 分支、版本和设备上尝试过它,并且没有问题。我还尝试过使用我们拥有的另一个应用程序,它可以在模拟器和真实设备上正常运行。
解决方案
修复了它,我跑了react-native bundle --minify --entry-file index.ios.js --platform ios --dev false --bundle-output ./ios/main.jsbundle --assets-dest ./ios
,它工作了......(使用 index.ios.js 或 index.js)
推荐阅读
- python - discord.py 如何在命令中传递另一个命令
- reactjs - 如何使用变量名来引用 React 中的导入?
- python - 在 colab 中使用 ssd_inceptionv2 时出现问题(错误 import tf_slim as slim ModuleNotFoundError: No module named 'tf_slim'
- git-log - 如何在 `git log -- dir` 中显示分支?
- flutter - 如何在一个小部件和另一个小部件中设置变量值?
- docker - 使用 docker-compose 时如何在我的 Dockerfile 中传递 ENV 参数
- python - Github的Python API,获取特定分支的特定目录中的内容不返回所有内容
- canvas - 在 React Leaflet 中的 Canvas 上拖动多个多边形重新渲染
- python - Django admin 多对多 - 如何显示附加字段?
- c# - C# - 显示使用 Revit API 创建的楼板