React Native TextInput problem Attempt to browke virtual method 'boolean abi44.com facebook has State manager

2ekbmq32  于 2023-10-22  发布在  React
关注(0)|答案(1)|浏览(99)

我想在我的listHeaderComponent中添加一个TextInput,但是当我添加这个时,我得到这个错误:

当我删除textInput,然后我得到没有错误,它的工作原理.
代码:

...
  function Header() {
    return (
    <View style={s.header}>
          <Text style={s.headerTitle}>{t('packet.multiple_send_title')}</Text>
          <TextInput value={value} onChangeText={(e) => setValue(e)} />
          <Button onPress={handleSendMessages} disabled={selectedUsers.length > 0 ? false : true} style={[ButtonStyles.full, s.btnSend]}>
            <Text style={s.btnSendText}>{t('packet.multiple_button_send')}</Text>
          </Button>
        </View>)
  }
  return (
    <Modalize
      ref={ref}
      modalStyle={{ flexGrow: 1, padding: 8 }}
      flatListProps={{
        data: newArr(),
        style: {
          padding: 0,
          flexGrow: 1
        },
        renderItem: renderItem,
        ListEmptyComponent: ShowTextWhenArrayIsEmpty,
        ListHeaderComponent: Header,
        keyExtractor: (item, i) => i.toString(),
        showsVerticalScrollIndicator: false,
        stickyHeaderIndices: [0],
        scrollEventThrottle: 16,
        maxToRenderPerBatch: 2,
        keyboardShouldPersistTaps: 'handled',
        initialNumToRender: 4,
        updateCellsBatchingPeriod: 200,
      }}
    />
jrcvhitl

jrcvhitl1#

我也遇到了同样的错误,将此添加到app/build.gradle对我有效:

dependencies {
...
implementation ("androidx.appcompat:appcompat:1.3.1") {
    version {
        strictly '1.3.1'
    }
}
...
}

来源:https://github.com/oblador/react-native-keychain/issues/553#issuecomment-1253983687

相关问题