作者你好,在从零基础到APP上线这本书中第542页智能小车那里,我把所有代码写好了之后,出现了一个异常
java.lang.NullPointerException: Attempt to invoke virtual method 'android.bluetooth.BluetoothDevice android.bluetooth.BluetoothAdapter.getRemoteDevice(java.lang.String)' on a null object reference
导致无法打开其本身Activity
还有一个问题是
Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`
这个又该怎么解决呢?
谢谢!