Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.1
-
None
-
Android 10, Android 11, Windows 10, SDK_Platform 31, SDK Version 5.0, NDK Version 21.3.6528147
-
-
9013f62006fda61c762061e9d2ce91f12c68a3f5 (qt/qtconnectivity/dev) 3f0902d9c4bb96a473dd79fa0183c9cb9265ac08 (qt/qtconnectivity/6.2)
Description
Steps to reproduce: Build and install bluetooth/btchat example on two Android devices (I think the server side could be any platform, I tried on windows, but I encounter an unrelated bug QTBUG-98323), pair both devices and try to connect one to the other. The error will occur on the Android client side.
Tested on Android 10 and 11.
QBluetoothSocket.connectToService works fine on qt 5.15.2.
D libbtchat_arm64-v8a.so: Connecting to service 2 "" on "TestDevice" D libbtchat_arm64-v8a.so: Going to create client D libbtchat_arm64-v8a.so: Connecting... D libbtchat_arm64-v8a.so: Start client D libbtchat_arm64-v8a.so: Create socket W qt.bluetooth.android: : Changing socket protocol to RFCOMM W System.err: java.lang.NoSuchMethodError: no non-static method "Landroid/bluetooth/BluetoothAdapter;.getRemoteDevice(Ljava/lang/String;)Landroid.bluetooth.BluetoothDevice;" W System.err: at org.qtproject.qt.android.QtNative.startQtApplication(Native Method) W System.err: at org.qtproject.qt.android.QtNative$7.run(QtNative.java:633) W System.err: at org.qtproject.qt.android.QtThread$1.run(QtThread.java:61) W System.err: at java.lang.Thread.run(Thread.java:920) D libbtchat_arm64-v8a.so: ConnectToService done