如何导入android.device [英] How to import android.device

查看:132
本文介绍了如何导入android.device的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 android.device.ScanManager 中的ScanManager.但是我在导入行上收到错误无法解析符号'device'" .

I'd like to use ScanManager from android.device.ScanManager. But I get the error "cannot resolve symbol 'device'" on the import line.

有人可以告诉我我在想什么吗?

Can somebody tell me what I am missing ?

推荐答案

在应用程序级别的 gradle 文件中使用此库,效果很好

Use this library in your gradle file at app level it works out great

如果Android Studio> = 3.0

If Android Studio >= 3.0

实现'com.github.DeveloperPaul123:SimpleBluetoothLibrary:1.5.1'

其他用途

编译'com.github.DeveloperPaul123:SimpleBluetoothLibrary:1.5.1'

我已经用它来检测蓝牙硬件设备并与它们连接Android设备

I have used it to detect Bluetooth Hardware devices and interface Android devices with them

Android蓝牙中的GATT配置文件有一个名为 BluetoothGatt BluetoothDevice 的不同类,用于访问蓝牙设备.

The GATT Profile in Bluetooth for Android has a different class named BluetoothGatt and BluetoothDevice to access the bluetooth devices.

如果您想从[here]设置此ScanManager类,也可以导入该类.( https://android.googlesource.com/platform/packages/apps/Bluetooth/+/master/src/com/android/bluetooth/gatt/ScanManager.java )

You can import this class as well if you want this ScanManager classes set from [here] (https://android.googlesource.com/platform/packages/apps/Bluetooth/+/master/src/com/android/bluetooth/gatt/ScanManager.java)

这篇关于如何导入android.device的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆