Invariant Violation: requireNativeComponent: "RNCAndroidDialogPicker" was not found in the UIManager
See original GitHub issueBug report
Summary
In expo 38 I get an error: Invariant Violation: requireNativeComponent: “RNCAndroidDialogPicker” was not found in the UIManager
"expo": "^38.0.0"
"react": "16.11.0"
"@react-native-community/picker": "^1.6.6"
I see at https://github.com/react-native-community/react-native-picker#user-content-for-managed-workflow-users-using-expo-37 that this package is not for expo 37, so I assume that expo 38 is also not supported?
If so, then react-native’s Picker also doesn’t seem to work for me, so I plan to try react-native-picker-select next.
Environment info
react-native info output:
System:
OS: Linux 4.4 Ubuntu 14.04.6 LTS, Trusty Tahr
CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Memory: 20.45 GB / 31.93 GB
Shell: 4.3.11 - /bin/bash
Binaries:
Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
Yarn: Not Found
npm: 6.14.8 - ~/.nvm/versions/node/v12.16.1/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 11.0.5 - /usr/bin/javac
Python: 2.7.6 - /usr/bin/python
npmPackages:
@react-native-community/cli: ^4.12.0 => 4.12.0
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
*react-native*: Not Found
Library version: 1.6.6
Steps to reproduce
- Import
Pickerfrom ‘@react-native-community/picker’; - use
<Picker ...><Picker.Item.../></Picker>in your component - run
npx expo startand connect to expo with an actual Android device
Describe what you expected to happen:
- I should see my component with picker
- I should be able to tap on the picker and select an option
Reproducible sample code
https://snack.expo.io/@aproximation/react-native--community-picker-rncandroiddialogpicker-error
Issue Analytics
- State:
- Created 3 years ago
- Reactions:29
- Comments:43
Top Results From Across the Web
RNCAndroidDropdownPicker was not found in the UIManager
I have installed nativebase version 2.15.2. I am getting following error in android: requireNativeComponent "RNCAndroidDropdownPicker ...
Read more >requireNativeComponent: "RNCAndroidDialogPicker" was not ...
invariant violation: requirenativecomponent: "rncandroiddialogpicker" was not found in the uimanager. Add Answer | View In TPC Matrix.
Read more >How to use react-native-picker-select - LogRocket Blog
requireNativeComponent "RNCPicker" was not found in the UIManager error. You can resolve this error by running: // React Native CLI npm ...
Read more >RNCAndroidDialogPicker" was not found in the UIManager ...
RNCAndroidDialogPicker" was not found in the UIManager after upgrade to nativebase 2.13.15.
Read more >ERROR Invariant Violation: requireNativeComponent ...
ERROR Invariant Violation: requireNativeComponent: “RNSScreenStackHeaderConfig” was not found in the UIManager. In React Native… Photo by Luca Nicoletti on ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Manually linking helped me resolve the issue, but don’t follow the steps mentioned in the readme.
import com.reactnativecommunity.picker.RNCPickerPackage;to the imports at the top of the file Addnew RNCPickerPackage()to the list returned by thegetPackages()methodinclude ':@react-native-community_picker' project(':@react-native-community_picker').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/picker/android')implementation project(':@react-native-community_picker')Hope this helps someone! Cheers! 🎉
This is happening as well on RN 0.63, without expo