TypeError: null is not an object (evaluating '_reactNative.NativeModules.DialogAndroid.show'
See original GitHub issueHello I’m getting that error and I don’t understand why ?
Here is my code
_selectForm = async () => {
try {
const { selectedItem } = await DialogAndroid.showPicker('Pick a form', null, {
items: [
{ label:'12 Months', id:'12-months' },
{ label:'16 Months', id:'16-months' },
{ label:'20 Months', id:'20-months' }
]
});
if (selectedItem) {
// when negative button is clicked, selectedItem is not present, so it doesn't get here
console.log('You selected item:', selectedItem);
this.props.navigation.navigate("CollectingDataScreen", {
form: selectedItem
});
}
} catch(e) {
console.log("DIALOG ANDROID EROOR ... ", e);
}
}
And after installing, the version from package.json
is "react-native-dialogs": "^1.0.4"
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
null is not an object evaluating '_reactNative.NativeModules ...
If you are using expo, this issue occurs if you a running your app on a device that is running on iOS 14....
Read more >null is not an object (evaluating '_reactNative.NativeModules ...
Hi I'm new to react native and I have an expo app that I am trying to use this package in in order...
Read more >Android custom native module
I followed the steps but when i run expo start and scan the qr code i got this error : TypeError: null is...
Read more >null is not an object (evaluating 'nativemodules[sqlite][method ...
I am trying to use the react-native-sqlite-storage library but I can't seem find any solution to this error. I have looked around for...
Read more >null is not an object (evaluating 'RNPurchases ...
I installed the expo managed workflow and also followed the revenuecat/react-native-purchases guide and trying a simple code to setDebugLogs ...
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
this error is caused by the fact that the native module is not correctly linked; follow https://github.com/aakashns/react-native-dialogs#manual-linking or if you’re on RN0.60 or newer, compiling should just work because of autolinking
Look, I’m having this error:
And in this case, my code is: