Tried to register two views with the same name AndroidDropdownPicker
See original GitHub issueDescribe the bug
Getting error with following message:
Tried to register two views with the same name AndroidDropdownPicker
The error seems to be similar to this: https://github.com/react-native-community/react-native-picker/issues/15
To Reproduce
Steps to reproduce the behavior:
In my project, I have used also this component:
import { Picker } from ‘@react-native-community/picker’;
I believe it is a clash between these components. Any way to avoid this error and be able to use both?
Expected behavior
Be able to use this component without clashing with other components.
Screenshots
“n/a”.
Additional details
- Device: Android
- OS: Android 10
- react-native-picker-select version: 7.0.0
- react-native version: 0.62.2
- react version: 16.11.0
Reproduction and/or code sample
import React, { useState } from 'react';
import { StyleSheet, TouchableNativeFeedback, View, Text, Image } from 'react-native';
import RNPickerSelect from 'react-native-picker-select';
export default function AdminHome({ navigation }) {
return (
<View>
<RNPickerSelect
accessibilityLabel={'gender'}
onValueChange={(value) => console.log(value)}
items={[
{ label: 'Football', value: 'football' },
{ label: 'Baseball', value: 'baseball' },
{ label: 'Hockey', value: 'hockey' },
]}
/>
</View>
);
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Tried to register two views with the same name RNCPicker ...
Describe the bug I am trying to implement this react-native-picker-select in the react-native app but after npm install, tried to run the ...
Read more >Invariant Violation: Tried to register two views with the same ...
To get rid of that, do the following: Since the error is about registering two views with the same name, declare your Picker...
Read more >Invariant Violation: Tried To Register Two Views With The ...
CSDNInvariant Violation : Tried to register two views with the same name AndroidDropdownPicker. CSDNTried to register two views with the same name ...
Read more >Tried to register two views with the same name RNSVGSvgView
Hello, why I get this error message? Tried to register two views with the same name RNSVGSvgVie I want to use svg, and...
Read more >ERROR Invariant Violation: Tried to register two views with the ...
Solucionado | Boa tarde, nesta aula estou com o seguinte erro log: ERROR Invariant Violation: Tried to register two views with the same...
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 FreeTop 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
Top GitHub Comments
@react-native-community/picker
deprecated. So remove it byyarn remove @react-native-community/picker
and installyarn add @react-native-picker/picker
. This solved the issue for me.I fixed this problema installing the following versions:
"@react-native-community/picker": "1.6.0"
"react-native-picker-select": "7",