react-native-picker-select icon indicating copy to clipboard operation
react-native-picker-select copied to clipboard

Not Woking with 0.64(Invariant Violation: requireNativeComponent: "RNCAndroidDialogPicker" was not found in the UIManager)

Open learncodingforweb opened this issue 3 years ago • 15 comments

Describe the bug
Invariant Violation: requireNativeComponent: "RNCAndroidDialogPicker" was not found in the UIManager

To Reproduce
Steps to reproduce the behavior:

    <View style={styles.container}>
      <Text>Home Page</Text>
      <RNPickerSelect
        onValueChange={value => console.log(value)}
        useNativeAndroidPickerStyle={false}
        items={[
          {label: 'Football', value: 'football'},
          {label: 'Baseball', value: 'baseball'},
          {label: 'Hockey', value: 'hockey'},
        ]}
      />
    </View>
"dependencies": {
    "react": "17.0.1",
    "react-native": "0.64.0",
    "react-native-picker-select": "^8.0.4"
  },

learncodingforweb avatar Apr 22 '21 18:04 learncodingforweb

I have the same issue in React Native version 0.64

DwCleb avatar Apr 22 '21 21:04 DwCleb

I have the same issue in RN 0.63.3

sclavijo93 avatar Apr 26 '21 23:04 sclavijo93

I have also a issue with Android RN 0.64.1. I have this issue also with @react-native-picker/picker

I think on my side there is an issue on RN. I come from a screen with a FlatList and a stickyHeader and navigate to a detail screen where the picker is placed. After removing the stickyHeader everything works fine again.

ChristianSeidl avatar May 13 '21 17:05 ChristianSeidl

i have the same problem in version 0.62.2, but just with the expo

matheusmirandaferreira avatar May 18 '21 13:05 matheusmirandaferreira

You need to install @react-native-community/picker to fix the error.

Saurabhreactninja avatar May 26 '21 19:05 Saurabhreactninja

You need to install @react-native-community/picker to fix the error.

It's deprecated.

JanithaR avatar Jun 18 '21 08:06 JanithaR

You need to install @react-native-community/picker to fix the error.

It's deprecated.

It becomes @react-native-picker/picker now https://github.com/react-native-picker/picker

flora8984461 avatar Jun 30 '21 02:06 flora8984461

install @react-native-picker/picker it will remove that error , work for me.

rameshparajuli avatar Jul 02 '21 07:07 rameshparajuli

didn't work for me either! RN version 0.66.0

ste7en avatar Oct 11 '21 14:10 ste7en

Had to patch-package the import in library and install "@react-native-picker/picker" manually. Kinda hacky, but w/e.

diff --git a/node_modules/react-native-picker-select/src/index.js b/node_modules/react-native-picker-select/src/index.js
index 994440f..63aab8a 100644
--- a/node_modules/react-native-picker-select/src/index.js
+++ b/node_modules/react-native-picker-select/src/index.js
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
 import { Keyboard, Modal, Platform, Text, TextInput, TouchableOpacity, View } from 'react-native';
 import PropTypes from 'prop-types';
 import isEqual from 'lodash.isequal';
-import { Picker } from '@react-native-community/picker';
+import {Picker} from '@react-native-picker/picker';
 import { defaultStyles } from './styles';
 
 export default class RNPickerSelect extends PureComponent {

Pyroboomka avatar Dec 13 '21 14:12 Pyroboomka

Installing https://github.com/react-native-picker/picker fixes the issue

sagarv1997 avatar Oct 23 '22 06:10 sagarv1997

@sagarv1997 thanks but do you know why this resolves the issue? The package.json inside the dependency (i.e. react-native-picker-select) already has that package.

I am actually looking for a way to resolve it without adding this line (lest someone removes it because npx depcheck says the package is unused).

SufianBabri avatar Aug 23 '23 17:08 SufianBabri