我的应用程序适用于BLE设备并按以下方式搜索它们(API21+):adapter.getBluetoothLeScanner().startScan(filters,scanSettings,this);它适用于大多数设备(例如三星),但在某些LGE和HTC设备(使用Android6.0)上返回null并崩溃:Causedbyjava.lang.NullPointerException:Attempttoinvokevirtualmethod'voidandroid.bluetooth.le.BluetoothLeScanner.startScan(java.util.List,and