Android Print SDK error

// Expert user has replied.
V Vena Bena 1 year 11 months ago
48 2 0

Hello,

I got this error in Print SDK.
Any suggestions pls?

Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.Map.containsKey(java.lang.Object)' on a null object reference
at com.zebra.sdk.comm.internal.UsbUtils.isCardPrinter()
at com.zebra.sdk.comm.UsbConnection.write()
at com.zebra.sdk.comm.ConnectionA.write()
at com.zebra.sdk.comm.ConnectionA.sendAndWaitForValidResponse()
at com.zebra.sdk.printer.SGD.GET()
at com.zebra.sdk.printer.SGD.GET()
at com.zebra.sdk.printer.internal.ZebraPrinterFactoryHelper.getApplNameHocusPocus()
at com.zebra.sdk.printer.internal.ZebraPrinterFactoryHelper.getLanguage()
at com.zebra.sdk.printer.internal.ZebraPrinterFactoryHelper.getInstance()
at com.zebra.sdk.printer.internal.ZebraPrinterFactoryHelper.getInstance()
at com.zebra.sdk.printer.ZebraPrinterFactory.getInstance()

Please Register or Login to post a reply

2 Replies

J James Swinton-Bland

Hi, the map you're looking for a key inside is null - you'll need to null check your map before checking for any keys.

V Vena Bena

Hi, thx for the replay. Yes, that I known, but the problem is, that thi part of the code is inside the SDK from Zebra, as you can see from package name

CONTACT
Can’t find what you’re looking for?