NativeBase: RNCAndroidDropdownPicker was not found in the UIManager
Hi Thanks contributor for a best library for react native.
In latest version i am getting following error in android platform:
RNCAndroidDropdownPicker was not found in the UIManager
node: 10.15.0 react-native: 0.63.4 nativebase: 2.15.2
Expected behaviour
PIcker shoult also working in android platform.
Actual behaviour
Getting following error in Android:
RNCAndroidDropdownPicker was not found in the UIManager
Steps to reproduce
Code snipped:
<Item picker>
<Picker
mode="dropdown"
iosIcon={<Icon name="arrow-down" />}
selectedValue={this.state.domain}
onValueChange={(text) => { this.onValueChangeUpdateState("domain", text); }}
placeholder="Select Domain"
iosHeader="Select Domain"
>
<Picker.Item label="Select Domain" value="" />
<Picker.Item label="DMT" value="dmt" />
</Picker>
</Item>
``
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 18
- Comments: 24
Hello, just installing
@react-native-picker/picker@^1.9.7fixes the issue for me.That version matches that used by native-base. Its also imperative to keep importing from native-base as it applies the predefined styles to the picker component.
I think this issue has to do with auto-linking of the
@react-native-picker/pickerpackage. When its a dependency of native-base alone, somehow its not linked, but when directly depended upon by your app, its linked properly.Hope it helps you 🚀 Happy Coding…
I found in source code that picker depends from @react-native-picker/picker package, so i just installed it with
npm install @react-native-picker/picker --saveand this fixed error.https://github.com/GeekyAnts/NativeBase/blob/02f5b23e19b3db594e5b5828f336fdac32cfb1fc/src/basic/Picker.js#L5
Not sure if this is somehow an accepted way to proceed (old style, maybe…so I think it’s not a resolution to the bug but a possible workaround), but I have manually edited
settings.gradleandapp/build.gradletogether with a line added toMainApplication.javain order to make it work.The first step was to install the package:
npm install @react-native-community/picker --saveapp/build.gradleAdded
implementation project(path: ':@react-native-community-picker')to the
dependenciessection.settings.gradleAdded
MainApplication.javaThis is not a solution, but I wanted to add some steps that made the module work soon (very urgent for me).
I’m getting this same issue, installing @react-native-picker/picker did not resolve the issue for me.
i think this is true. that is why we have to install again react-native-picker into our dependencies.
but if we want to make both of them use the latest version, reinstall native-base so it would install latest version of react-native-picker. Then install react-native-picker. for me, now both of them using react-native-picker 1.15.0 and the error solved too.
thanks to @mernxl
I am not sure if this should be closed. Isn’t it still an issue because something about the dependencies is off?
I got a similar issue, but only downgrading to native-base <= 2.13.14 seems to resolve it.
This solution working but we need to get a solution for @react-native-picker/picker because @react-native-community-picker This package has been deprecated. Can you please provide me a solution for this issue?
@gabrielhpugliese you are right. previously i was using native-base@2.13.14. now i install @react-native-picker/picker which resolved issue.
I saw nativebase importing from @react-native-picker/picker package.
native-base/src/basic/Picker.js
installing @react-native-picker/picker resolved the issue in my case
After install @react-native-picker/picker, we must build application again. ‘@’ packages must require building to implementation after install. This worked for me.
I could only solve it by downgrading native-base@2.13.14