0

导入时出现此错误:

import DropDownPicker from 'react-native-dropdown-picker';

import DateTimePicker from '@react-native-community/datetimepicker';

<DropDownPicker
                    zIndex={5000}
                    onOpen={() => setIsVisible(false)}
                    onClose={() => setIsVisible(true)}
                    placeholder="Choose A Location"
                    items={locations}
                    arrowColor='deepskyblue'
                    containerStyle={{ height: 50, marginTop: 6, marginBottom: 14 }}
                    style={{ backgroundColor: 'white' }}
                    itemStyle={{ justifyContent: 'flex-start' }}
                    dropDownStyle={{ backgroundColor: 'white' }}
                    onChangeItem={item => setLocation(item.label)}
                />
<DateTimePicker
                       format="DD-MM-YYYY"
                       value={new Date(date)}
                       mode="date"
                       display="spinner"
                       onChange={onChange}
                   />

我不知道为什么我会收到这个错误以及如何解决它,有人可以帮助我。

4

1 回答 1

0

这可能是库冲突,您可能要导入 2 个相同的库。

于 2021-04-27T06:38:36.293 回答