cancel
Showing results for 
Search instead for 
Did you mean: 

ST25SDK on VisualStudio + Xamarin

xNiux
Associate II

Hi,

I'm developping an application for Android on VisualStudio with Xamarin.

I implemented the ST sdk, interfaces and the « ST driver » Tagdiscovery.

But at the execution, In the « PerformTagDiscovery » into TagDiscovery class, the line « tagInfo.nfcTag = new ST25DVTag(readerInterface, uid); » generate an exception :

Java.Lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/lang3/BitField;

I try to implement manually Commons-Lang from apache on VisualStudio, but not possible, there is many and many error ....

Is that a solution ?

1 ACCEPTED SOLUTION

Accepted Solutions
xNiux
Associate II

I finally found the solution. I add to my project the commons-lang3-3.8.1.jar (found on the apache site), and set it in « AndroidJavaLibrary).

And all it’s now ok.

View solution in original post

16 REPLIES 16
Olivier L
ST Employee

Hi,

The ST25 SDK indeed has a dependency on org.apache.commons:commons-lang3.

In Android App, we manage that thanks to Gradle. We had the following dependency in "build.gradle":

implementation 'org.apache.commons:commons-lang3:3.5'

I don't know it is done in Xamarin but I expect that you can specify the dependencies somewhere. I don't think that implementing Commons-Lang manually is the good solution.

Regards

Olivier

xNiux
Associate II

Yes, it was my conclusion ... But in Xamarin, the org.apache.commons seems to be not completely implemented ... In mono-android, there is only the org.apache.commons.logging which are implemented ....

Olivier L
ST Employee

I don't have Xamarin knowledge to give you advices. 'org.apache.commons:commons-lang3:3.5' is prety common so do you know how the other Xamarin users are managing the dependency? Is there some threads on StackOverflow?

For your information, we are using the following classes of 'org.apache.commons:commons-lang3:3.5':

org.apache.commons.lang3.StringUtils;

org.apache.commons.lang3.BitField;

org.apache.commons.lang3.ArrayUtils;

xNiux
Associate II

I finally found the solution. I add to my project the commons-lang3-3.8.1.jar (found on the apache site), and set it in « AndroidJavaLibrary).

And all it’s now ok.

Olivier L
ST Employee

Good! I'm glad that you found a way to add this library. Well done!

Best regards

Olivier

XRakh.1
Associate

Hi xNiux

I was searching St25Sdk for my Xamarin Android project, I was wondering if you could share your Xamarin version of St25SDK, I would be very grateful if you could share it.

DavidSpecter
Associate II

Hi xNiux,

I've been trying to fix this for weeks. If you feel like it, could you share your project so I can understand where I'm wrong?

Thankyou so much,

Davide.

xNiux
Associate II

OK, so you can found my ST25SDK project joined to this message.

But my project was closed by my leader 3 years ago :(

Hi xNiux,

I'm so sorry that your leader close your project.

Thankyou so much for the dll. I tried to implement it but still no result. I realize that is asking you a lot. Could you also share the Xamarin project?

Thanks a lot,

Davide.