TypeError: undefined is not a function (near '..._reactNativeSystemSetting.default.addlistener...')
The code is :- this.listener = SystemSetting.addlistener( async (locationEnabled) =>{ if(!locationEnabled && !this.state.locationProcessing){ await this.setState({ locationProcessing:true }); console.log("Location is turned off in between"); await this.getLocationAccess(); this.setState({ locationProcessing:false }); } } ); SystemSetting.removeListener(this.listener);
The error is :- TypeError: undefined is not a function (near '..._reactNativeSystemSetting.default.addlistener...')
This error is located at: in MainScreen (at App.js:31) in App (at renderApplication.js:45) in RCTView (at View.js:34) in View (at AppContainer.js:106) in RCTView (at View.js:34) in View (at AppContainer.js:132) in AppContainer (at renderApplication.js:39)