Hello, I鈥檓 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
I didn't spot such a situation. Did you enable permissions before starting scanning?
@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.
Hi, downgrading the JDK to version 8 like @renanborgez said seems too work :)
The weird thing is that for some time I manage to make it work with version 10 and at one time it stopped right after I linked a new native module... I downgraded after seeing this and I started working again right after !
If this is truly linked to the JDK version, it should be listed as such on the README to prevent other folks asking this question.
Yeah, i'm agree with @tsyirvo
The point is, if the version 10 is not supported and it is an expected behaviour for the version 10 or it is actually a bug that no one has catch it yet.
In any case we should have an action for it
To solve the bug or to document it on README
@dariuszseweryn Can it be somehow related to RxAndroidBle?
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.
Phew, thanks so much for having this issue logged. Saved me a lot of time!
Most helpful comment
@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.