Hi All,
The full error is: Java.Lang.NoSuchMethodError Message=no non-static method "Lcom/symbol/emdk/sam/SAM;.getSmartCardATR()[B"
Im using a TC77 on 8.1 Android, Visual Studio 2019.
Using v5 SAM examples located here: https://techdocs.zebra.com/emdk-for-xamarin/7-0/samples/sam/ (It says v7, but its actually v5)
The v5 examples by default dont have the latest EMDK for Xamarin, so it has been updated using the NuGet package manager built in from Visual Studio.
It successfully updates to 7.0.0.14, running the application at this stage works as expected.
Moving upto 7.0.0.14 gives the additional methods: getSmartcardATR() and setSmartcardPPS()
For the sake of this thread i'm only interested in getSmartcardATR().
Adding in "byte[] atrStream = sam.GetSmartCardATR();" directly below "sam.Connect();" results in the error being thrown.
After searching for the reason why this is happening, online it suggests that it could be a code shrinker issue, however the default project settings have no code shrinker.
For sanity I added a code shrinker and then a proguard configuration as per alot of the comments I found. This didnt work either.
EDIT: I have also gone through the project and deleted XamarinEMDK.dll which wasnt v7.0.0.14. Just incase it was picking up the older version.
I tried looking at the documentation for v7 but the methods arent listed: https://techdocs.zebra.com/emdk-for-xamarin/7-0/api/sam/SAM/
Ive also looked at the recent release noted with no reference to these methods.
Am I missing something? Is the DLL compiled incorrectly?
7 Replies
Can I please clarify I have understood the issue correctly?
EMDK for Android has the method getSmartCardATR() in the latest release, https://techdocs.zebra.com/emdk-for-android/11-0/api/reference/com/symb…--
Whereas EMDK for Xamarin does not have that same method in its latest release, either in the docs or apparently in the Nuget package.
EMDK for Xamarin has the method getSmartCardATR() in the latest release.
Using object viewer in Visual Studio shows the method in the dll.
Just the online documentation doesnt have it listed, however any attempts to use this method is resulting in the Java.Lang.NoSuchMethodError.
OK thanks... let me ask internally and see what I can find out.
Hi, the engineering team tell me they are looking into it.
Any update?
Apologies for the delayed response, let me check...
I have heard back from engineering - GetSmartCardATR() IS a valid method and should work in EMDK for Xamarin. Apparently there was an issue with the documentation not getting generated for the latest DLL release. Please keep an eye on http://zebra-stage.github.io/ for updated preview documentation in the next few days. Why this is giving you a NoSuchMethodError I still can't say, if you have a support contract I suggest raising a ticket at https://www.zebra.com/us/en/about-zebra/contact-zebra/contact-tech-supp… for additional support.