I have installed nativebase version 2.15.2. I am getting following error in android:
requireNativeComponent "RNCAndroidDropdownPicker" was not found in the UIManager
I have installed nativebase version 2.15.2. I am getting following error in android:
requireNativeComponent "RNCAndroidDropdownPicker" was not found in the UIManager
I started getting this issue after installing the node modules on fresh install. After some research I resolved it by installing the package.
If you are using yarn for package installing
yarn add @react-native-community/picker
If you are using npm
npm install @react-native-community/picker
If you are using expo
expo install @react-native-community/picker
It's working for me:
npm install @react-native-picker/picker --save
Linking:
iOS:
cd ios && pod install
Android:
Clear and gradle run
Just had the same issue with a fresh install (no expo) Simple fix for me was the usual suspects.
Reset the server & cache
npx react-native start --reset-cache
Remove node modules, clean, and build. Reinstall and run again.
rm -rf node_modules
npm i
cd android/
./gradlew clean
cd ../
npx react-native run-android
The problem is with native-base version 2.x Replace this:
import { Picker, Button, Container, Form, Item, Card, Text, Icon, Label } from 'native-base';
for this:
import { Picker } from '@react-native-picker/picker';
import { Button, Container, Form, Item, Card, Text, Icon, Label } from 'native-base';
Of course you need to install:
@react-native-picker/picker
yarn add @react-native-picker/picker
Tested in react-native >= 0.68.x