2019-08-23 08:39 AM
Hi,
I have just started a new app using SDK 1.5.0. The problem I am seeing also is present in V1.4.0.
We are using an ST25DV04K tag, and on phone scanning a tag we get through to line 192 TagDiscovery.java:
try {
switch (tagInfo.productID) {
case PRODUCT_ST_ST25DV64K_I:
case PRODUCT_ST_ST25DV64K_J:
case PRODUCT_ST_ST25DV16K_I:
case PRODUCT_ST_ST25DV16K_J:
case PRODUCT_ST_ST25DV04K_I:
case PRODUCT_ST_ST25DV04K_J:
tagInfo.nfcTag = new ST25DVTag(readerInterface, uid);
break;
Stepping into ST25DVTag. However, as we descend into the libraries, we eventually get here:
public STRegisterField(String name, String description, int mask) {
this.mName = name;
this.mDescription = description;
this.mMask = mask;
this.mBitField = new BitField(mask);
this.getBitStartEnd();
}
But there is an eventual crash in STRegister.java, line 5 (this.mBitField = new BitField(mask).
Stack trace:
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:325)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/lang3/BitField;
at com.st.st25sdk.STRegister$STRegisterField.<init>(STRegister.java:73)
at com.st.st25sdk.STRegister.<init>(STRegister.java:274)
at com.st.st25sdk.type5.st25dv.ST25DVRegisterGpo.<init>(ST25DVRegisterGpo.java:94)
at com.st.st25sdk.type5.st25dv.ST25DVRegisterGpo.newInstance(ST25DVRegisterGpo.java:78)
at com.st.st25sdk.type5.st25dv.ST25DVTag.initStaticRegisters(ST25DVTag.java:294)
at com.st.st25sdk.type5.st25dv.ST25DVTag.<init>(ST25DVTag.java:275)
at com.st.st25sdk.type5.st25dv.ST25DVTag.<init>(ST25DVTag.java:250)
at com.xx.LPMRN2.NFC.TagDiscovery.performTagDiscovery(TagDiscovery.java:192)
at com.xx.LPMRN2.NFC.TagDiscovery.doInBackground(TagDiscovery.java:109)
at com.xx.LPMRN2.NFC.TagDiscovery.doInBackground(TagDiscovery.java:63)
at android.os.AsyncTask$2.call(AsyncTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.commons.lang3.BitField" on path: DexPathList[[zip file "/data/app/com.xx.LPMRN2-2/base.apk"],nativeLibraryDirectories=[/data/app/com.xx.xx2/lib/arm, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.st.st25sdk.STRegister$STRegisterField.<init>(STRegister.java:73)
at com.st.st25sdk.STRegister.<init>(STRegister.java:274)
at com.st.st25sdk.type5.st25dv.ST25DVRegisterGpo.<init>(ST25DVRegisterGpo.java:94)
at com.st.st25sdk.type5.st25dv.ST25DVRegisterGpo.newInstance(ST25DVRegisterGpo.java:78)
at com.st.st25sdk.type5.st25dv.ST25DVTag.initStaticRegisters(ST25DVTag.java:294)
at com.st.st25sdk.type5.st25dv.ST25DVTag.<init>(ST25DVTag.java:275)
at com.st.st25sdk.type5.st25dv.ST25DVTag.<init>(ST25DVTag.java:250)
at ....NFC.TagDiscovery.performTagDiscovery(TagDiscovery.java:192)
at com.xx.LPMRN2.NFC.TagDiscovery.doInBackground(TagDiscovery.java:109)
at com.xx.LPMRN2.NFC.TagDiscovery.doInBackground(TagDiscovery.java:63)
at android.os.AsyncTask$2.call(AsyncTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Looks like a missing org.apache.commons.lang3.BitField library?
Any ideas appreciated.
Thanks,
Martin.
Solved! Go to Solution.
2019-08-23 08:48 AM
Please ignore / delete - I see in the docs to add a dependency to org.apache.commons:commons-lang3:3.5
Apologies,
Martin.
2019-08-23 08:48 AM
Please ignore / delete - I see in the docs to add a dependency to org.apache.commons:commons-lang3:3.5
Apologies,
Martin.