ed u ed u - 1 month ago 10
Android Question

Bluetooth BLE programming import error

everyone !

I am designing a Bluetooth BLE 4.0 application and I firstly copied a sample application from the internet to see how to develop it.

I expect to see somebody else to write search and display and do some works on BLE device. And everything nears OK, except these two underlined errors.

enter image description here

So where should I import these two classes?

Any suggestions would be very helpful!


ScanCallback and ScanResult were only added in API 21.
Make sure that API 21 is installed and also the project's build target is set o >= 18.