zsdk_android_api.jar

// Expert user has replied.
G GIANLUCA AMENDOLA 1 year 5 months ago
812 4 0

I tried to use the API ZSDK_ANDROID_API.jar on Netbeans to print on zebra Mz320 and It worked fine.

Now I started working with Android studio and It gives me the error of deprecated for the interface.

I tried to use the last Api version ,"zsdk-api-2.14.5198.jar" but It's the same.

Can someone help me.

Thanks in advanced

Please Register or Login to post a reply

4 Replies

S Steven Si

Normally deprecated function calls only result in compile warnings, not errors. I have the ZSDK_ANDROID_API.jar v2.14.5198 running in a project in Android Studio on MacBook. It has no issues. Can you share the compile error msg?

G GIANLUCA AMENDOLA

I show you the library I use in my program:

These are the library I use

And this is the error:

This is the error

 

You can see how class ZebraPrinter is deprecated.

S Steven Si

For the import statements, try using the following, instead of the com.zebra.android, which is not correct.

import com.zebra.sdk.printer.PrinterLanguage;
import com.zebra.sdk.printer.PrinterUtil;
import com.zebra.sdk.printer.ZebraPrinter;
import com.zebra.sdk.printer.ZebraPrinterFactory;
import com.zebra.sdk.printer.ZebraPrinterLanguageUnknownException;

 

G GIANLUCA AMENDOLA

It's working.

Thanks.

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