java.lang.NullPointerException: Attempt to invoke virtual method 'android.bluetooth.BluetoothGattCharacteristic android.bluetooth.BluetoothGattService.getCharacteristic(java.util.UUID)' on a null object reference

Hot problem!
This exception has a lot of traffic. You can help 11 users by writing a short tip.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by nexus1892
, 1 year ago
Attempt to invoke virtual method 'android.bluetooth.BluetoothGattCharacteristic android.bluetooth.BluetoothGattService.getCharacteristic(java.util.UUID)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'android.bluetooth.BluetoothGattCharacteristic android.bluetooth.BluetoothGattService.getCharacteristic(java.util.UUID)' on a null object reference
at com.megster.cordova.ble.central.Peripheral.writeCharacteristic(Peripheral.java:366)
at com.megster.cordova.ble.central.Peripheral.processCommands(Peripheral.java:440)
at com.megster.cordova.ble.central.Peripheral.queueCommand(Peripheral.java:414)
at com.megster.cordova.ble.central.Peripheral.queueWrite(Peripheral.java:396)
at com.megster.cordova.ble.central.BLECentralPlugin.write(BLECentralPlugin.java:253)
at com.megster.cordova.ble.central.BLECentralPlugin.execute(BLECentralPlugin.java:129)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:114)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:95)
at org.apache.cordova.PluginManager.exec(PluginManager.java:130)
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:28)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:155)
at android.os.HandlerThread.run(HandlerThread.java:61)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.