我正在尝试解决此错误消息:
原文链接:https://www.f2er.com/react/300950.htmlException ‘-[_NSDisctionary0 length]: unrecognized selector sent to instance 0x78964120’ was thrown while invoking alerWithArgs on target AlertManager with params
它来自我的代码行:
const response.error = 'bad credentials' Alert.alert('Login error',response.error,[{ text: 'Ok' }])
即使我从Facebook文档中复制/粘贴,我也会收到错误消息:
Alert.alert( 'Alert Title','My Alert Msg',[ {text: 'Ask me later',onPress: () => console.log('Ask me later pressed')},{text: 'Cancel',onPress: () => console.log('Cancel Pressed'),style: 'cancel'},{text: 'OK',onPress: () => console.log('OK Pressed')},] )
从错误消息中可以明显导入组件.我猜.
有人遇到过这个吗?不知道该怎么做?