我'm having major issues finding out why my Android application suddenly began crashing when it receives push notifications. I'使用 react-native-push-notification
并且应用程序注册了一个令牌,但是当向手机发送推送通知时,我收到错误消息:
W/ReactNativeJS( 917): Warning: Native component for "SharedElementTransition" does not exist
W/ReactNativeJS( 917): Warning: Native component for "MKTouchable" does not exist
W/ReactNativeJS( 917): Warning: Native component for "MKSpinner" does not exist
W/ReactNativeJS( 917): Warning: Native component for "TickView" does not exist
E/ReactNativeJS( 917): undefined is not an object (evaluating 'RNFSManager.RNFSFileTypeRegular')
这一切都非常神秘 . onNotification
方法没有内容,所以这让我想知道发送的消息是否还有其他错误 .
关于如何解决这个问题的任何建议将不胜感激 .
1 回答
我之前收到“MKTouchable”和“TickView”不存在警告,并且能够通过使用以下步骤解决它:
在我的终端我安装了rnpm
npm install -g rnpm
rnpm link
或者如果您具体知道哪个库不适合我喜欢的库react-native-material-kit
,请rnpm link react-native-material-kit
最后使用
react-native run-ios
或react-native run-android
for android重启您的react-native packager .注意:我在iOS的mac构建上运行,系统上的命令可能不同 .