0

I'm trying to create expo app on windows for android with 'react-native-ble-plx' package. However, after ejecting and scanning QR code on my Xiaomi I get an error: null is not an object (evaluating '_BleModule.BleModule.createClient').

I followed this steps from npm site(https://www.npmjs.com/package/react-native-ble-plx?activeTab=readme):

  1. npx create-expo-app BleTest
  2. npm install -g expo-cli
  3. expo eject or npx expo prebuild
  4. npm install --save react-native-ble-plx
  5. Configuring build.gradle and AndroidManifest.xml

I tried to run expo app straightaway after installing all these needs and everything was fine, but after importing and declaring BleManager error appears.I searched a lot of information about these, but I don't know where to look at exactly.

Importing:

import { BleManager } from 'react-native-ble-plx';

Declaring:

export default function App() {
  const manager = new BleManager();
  ...
}
OneCupOfTea
  • 5
  • 1
  • 3

0 Answers0