我在带有以下版本的react-native的帮助下实现了一个应用
{
"lodash": "^4.17.10",
"lottie-ios": "^3.0.3",
"lottie-react-native": "^3.0.1",
"metro-react-native-babel-preset": "^0.53.1",
"moment": "^2.22.2",
**"react": "^16.8.6",
"react-native": "^0.59.5",**
"react-native-android-location-services-dialog-box": "^2.6.0",
"react-native-calendars": "file:react-native-calendars",
"react-native-communications": "^2.2.1",
"react-native-credit-card-input": "^0.4.1",
"react-native-datepicker": "^1.7.2",
"react-native-device-info": "file:react-native-device-info",
"react-native-event-listeners": "^1.0.3",
"react-native-fbsdk": "^0.10.0",
"react-native-firebase": "^5.5.4",
"react-native-geocoder": "^0.5.0",
"react-native-gesture-handler": "^1.3.0",
"react-native-keyboard-aware-scroll-view": "^0.6.0",
"react-native-keyboard-spacer": "^0.4.1",
"react-native-material-buttons": "^0.5.0",
"react-native-material-ripple": "^0.8.0",
"react-native-material-textfield": "^0.12.0",
"react-native-medl-splash": "^1.0.2",
"react-native-modal": "^9.0.0",
"react-native-modal-datetime-picker": "^6.0.0",
"react-native-modal-picker": "0.0.16",
"react-native-permissions": "^1.1.1",
"react-native-ratings": "^6.3.1",
"react-native-raw-bottom-sheet": "^1.1.4",
"react-native-star-rating": "^1.1.0",
"react-native-star-rating-view": "0.0.12",
"react-native-swipeable-rating": "^0.1.1",
"react-native-vector-icons": "^6.4.2",
"react-native-wheel-picker-android": "^2.0.5",
**"react-navigation": "^2.12.1",**
"tipsi-stripe": "^7.4.0",
"xdate": "^0.8.2"
}
整个应用程序运行正常,但有时会崩溃并显示以下日志。
Thread 7 name: Dispatch queue: com.facebook.react.ExceptionsManagerQueue
Thread 7 Crashed:
0 libsystem_kernel.dylib 0x00000001f41b20dc 0x1f418f000 + 143580
1 libsystem_pthread.dylib 0x00000001f422b094 0x1f4229000 + 8340
2 libsystem_c.dylib 0x00000001f410aea8 0x1f40b0000 + 372392
3 libc++abi.dylib 0x00000001f37d7788 0x1f37d6000 + 6024
4 libc++abi.dylib 0x00000001f37d7934 0x1f37d6000 + 6452
5 libobjc.A.dylib 0x00000001f37eee00 0x1f37e9000 + 24064
6 libc++abi.dylib 0x00000001f37e3838 0x1f37d6000 + 55352
7 libc++abi.dylib 0x00000001f37e38c4 0x1f37d6000 + 55492
8 libdispatch.dylib 0x00000001f40547e8 0x1f3ff4000 + 395240
9 libdispatch.dylib 0x00000001f3ffd324 0x1f3ff4000 + 37668
10 libdispatch.dylib 0x00000001f3ffde40 0x1f3ff4000 + 40512
11 libdispatch.dylib 0x00000001f40064ac 0x1f3ff4000 + 74924
12 libsystem_pthread.dylib 0x00000001f4235114 0x1f4229000 + 49428
13 libsystem_pthread.dylib 0x00000001f4237cd4 0x1f4229000 + 60628
任何人都知道,这背后的确切原因可能是什么。 我大约执行了30-40次应用程序,并且仅崩溃了一次,而我无法确定其背后的确切原因。
答案 0 :(得分:2)
它可以是“react-native-wheel-picker-android”包。
我有同样的问题,就我而言,应用程序因“selectedItemTextColor”道具而崩溃。
这是 GitHub 存储库页面中的问题:https://github.com/Cero-Studio/ReactNativeWheelPicker/issues/123
答案 1 :(得分:0)
凭任何想象,这都不是一个完整的答案,但我已经安装了一个全局异常处理程序来帮助我找到真正的罪魁祸首。
要安装全局异常处理程序(JS 和 Native),请查看:
https://www.npmjs.com/package/react-native-exception-handler