question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Crash when triggering a scan

See original GitHub issue

Hello, I’m trying to use this lib to scan BLE devices on Android but when calling this.manager.startDeviceScan the app crash with no log whatsoever with the native popup MyApp has stopped.. On iOS I have no problem scanning and finding the device I want to connect to. Do I need to do something different on Android ?

I set the log level to verbose but nothing is shown and I can successfully use some other methods form the manager without issues. I tried passing a list of UUIDs or some options to startDeviceScan but the app always crash.

I’m using react-native 0.54.4 and react-native-ble-plx 0.10.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
renanborgezcommented, Oct 5, 2018

@tsyirvo Hello, i had the same problem as you, and in my case the problem was the JDK version. I was using the version 10, and it must be 8. You can check it. After the downgrade, reboot your system and compile the apk again.

1reaction
dariuszseweryncommented, Oct 11, 2018

Android OS does not work with anything that’s above Java 8. Android Build Tools do support only JDK 1.7 and 1.8. Actually it seems that the RN Getting Started page incorrectly specifies the JDK version needed as 8 or above.

Apparently some time ago it was correct:

Android Studio requires the Java SE Development Kit(JDK), version 8. You can type javac -version in a terminal to see what version you have, if any.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] Crash when triggering a scan · Issue #341 - GitHub
Hello, I'm trying to use this lib to scan BLE devices on Android but when calling this.manager.startDeviceScan the app crash with no log ......
Read more >
Detect and diagnose crashes - Android Developers
The first step to fix a crash is to identify the place where it happens. You can use the stack trace available in...
Read more >
On start scan BluetoothLeScanner app crashes and no results ...
The method getBluetoothLeScanner returns non- null only when Bluetooth is actually switched on on your device. As a result, you should call ...
Read more >
Bluetooth share application crashes when calling LeScan ...
Looking into the AOSP source code on branch android-4.4.4_r1 I found a git commit saying Merge "DO NOT MERGE Bluetooth: Cleanup bt_config.xml during...
Read more >
How to fix apps that keep crashing or freezing | Samsung IE
This usually occurs when your Wi-Fi or cellular data is slow or unstable, causing apps to malfunction. Another reason for Android apps crashing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found