Xamarin.AndroidX and ZebraPrinterSdk

// Expert user has replied.
J Jim Fiddes 1 year 5 months ago
163 1 0

Good morning Everyone

I'm looking to integrate Zebra printing within our 2 Xamarin products (iOS and Droid) and I've built a configuration tool allowing users to perform their printer setup. The issue I'm facing in when I add my zebra printing project to my application project as well as adding the ZebraSDK I'm fighting a number of missing Nuget errors. We have moved our product over to using Xamarin.AndroidX. libraries as other products we utilize required them. Now we are trying to utilize Zebra, I see through the demo code reference to the old Xamarin.Android.Support libraries and seeing we don't use those old nugets, we are getting errors. I've gone through and tried to add individual nugets that Zebra requires (FluentFTP being on example) however I'm currently stuck with this error:

49>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Legacy.targets(316,5): error XA2002: Can not resolve reference: `Windows`, referenced by `SdkApi.Desktop`. Please add a NuGet package or assembly reference for `Windows`, or remove the reference to `SdkApi.Desktop`.

Is there support for Xamarin.AndroidX is my first question and if yes, how do I go about resolving the build errors?

Please Register or Login to post a reply

1 Replies

S Steven Si

The Zebra.Printer.SDK should have no dependency on any Xamarin.Android NuGet package. It's self-sufficient, i.e., simply adding the Zebra.Printer.SDK (v2.15.2634) NuGet package alone to an existing project.

The Developer Demo was created prior to AndroidX came out. That's why the Xamarin.Android.Support was used in the Developer Demo. The Zebra.Printer.SDK has no bearing on the Xamarin.Android.Support.

We have used the Zebra.Printer.SDK for a number of internal projects that are based on Xamarin.AndroidX. We have no issues.

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