2019-03-15 08:45 AM
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 ?
Solved! Go to Solution.
2019-03-18 09:04 AM
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.
2019-03-15 08:59 AM
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
2019-03-18 01:53 AM
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 ....
2019-03-18 02:12 AM
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;
2019-03-18 09:04 AM
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.
2019-03-18 09:06 AM
Good! I'm glad that you found a way to add this library. Well done!
Best regards
Olivier
2021-10-18 04:22 AM
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.
2022-08-18 06:23 AM
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.
2022-08-19 06:21 AM
2022-08-19 06:53 AM
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.