kenjdavidson / react-native-bluetooth-classic

⚛ Bluetooth classic Android(Bluetooth)/IOS(ExternalAccessory) module for serial communication
https://kenjdavidson.github.io/react-native-bluetooth-classic
MIT License
250 stars 93 forks source link

TypeError: null is not an object (evaluating 'this._nativeModule.isBluetoothAvailable') #223

Closed OmarYousef-CS closed 1 year ago

OmarYousef-CS commented 1 year ago

Hi all I always get this error when I use any RNBluetoothClassic function: TypeError: null is not an object (evaluating 'this._nativeModule.isBluetoothAvailable') I don't think its related to permission and instillation my project: https://github.com/OmarYousef-CS/https---github.com-OmarYousef-CS-finalProject

kenjdavidson commented 1 year ago

You have an app.json, are you using Expo? If so, you won't be able to load the library without the with-rn-bluetooth-classic library or ejecting it.

OmarYousef-CS commented 1 year ago

In the end, I have built a new project using "npx react-native init" and it works fine. Thanks @kenjdavidson