Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

蓝牙扫描过程中,操作关掉蓝牙,后面出现崩溃 #12

Open
shenh1986 opened this issue Mar 29, 2022 · 1 comment
Open

Comments

@shenh1986
Copy link

日志如下:
W/BluetoothAdapter(18861): getBluetoothLeScanner() ble not available
D/AndroidRuntime(18861): Shutting down VM
E/AndroidRuntime(18861): FATAL EXCEPTION: main
E/AndroidRuntime(18861): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.bluetooth.le.BluetoothLeScanner.stopScan(android.bluetooth.le.ScanCallback)' on a null object reference
E/AndroidRuntime(18861): at gao.xiaolei.flutter_blue_elves.FlutterBlueElvesPlugin.lambda$getScanTimeoutCallback21$6$FlutterBlueElvesPlugin(FlutterBlueElvesPlugin.java:490)
E/AndroidRuntime(18861): at gao.xiaolei.flutter_blue_elves.-$$Lambda$FlutterBlueElvesPlugin$2V9C3iupvr1z0-5_MvV3wO8BJaw.run(Unknown Source:2)
E/AndroidRuntime(18861): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime(18861): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(18861): at android.os.Looper.loop(Looper.java:246)
E/AndroidRuntime(18861): at android.app.ActivityThread.main(ActivityThread.java:8653)
E/AndroidRuntime(18861): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(18861): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
E/AndroidRuntime(18861): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
I/Process (18861): Sending signal. PID: 18861 SIG: 9

@pineappleoOilPrince
Copy link
Owner

这个bug是因为蓝牙关闭的情况下定时停止扫描导致的 会在下一个版本修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants