首页 > 解决方案 > 构建发布 APK 后,flutter_blue 未检测到蓝牙设备

问题描述

flutter_blue: ^0.7.2

flutter_blue 在调试模式下工作正常,并检测和扫描可用的蓝牙设备,但在构建发布 APK 后未检测到蓝牙设备

Bluetooth device not found

标签: flutter

解决方案


它可能在发布模式下捕获错误,请使用此命令获取 apk:

  1. flutter clean

接着

  1. flutter build apk --no-shrink

您也可以使用此命令flutter run release在发布模式下进行调试


推荐阅读