NinjaDev
NinjaDev

Reputation: 1258

react-native-picker not working on react-native version 0.63.2

I upgraded react-native version to 0.63.2. Then I have a problem on Android app.

Android app show empty screen.

The error is as following:

Warning: Picker has been extracted from react-native core and will be removed in a future release. 
It can now be installed and imported from '@react-native-community/picker' instead of 'react-native'. 
See https://github.com/react-native-community/react-native-picker
ERROR    TypeError: Super expression must either be null or a function
ERROR    Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
ERROR    Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

How can I solve this problem?

Upvotes: 0

Views: 4162

Answers (2)

Mehran Khan
Mehran Khan

Reputation: 3636

Picker has been removed from "react-native" install library @react-native-picker/picker

replace

import {Picker} from 'react-native';

to

import {Picker} from '@react-native-picker/picker';

Upvotes: 4

Ruchira Swarnapriya
Ruchira Swarnapriya

Reputation: 1025

Now a days there are no use of react native packages most of the packages migrate to react native community. For your question remove node module using following steps and reinstall it using react native community,

  • react-native unlink
  • npm unlink npm
  • uninstall --save <Module name.

Upvotes: 0

Related Questions