IllegalAccessError: tried to access method com.symbol.emdk.barcode.Scanner.release

Y Yang Dong 3 years ago
0 1 0

We use the deInitScanner() on the onPause function to release scannner according to BarcodeSample1
My application use emdk3.1,when used on my device(TC700H),it works. when used on customer's device(TC700H) it crashes
down itself when onPause() called on BaseActivity.
 
if i remove the scanner release code,it works on customer's TC70 very vell. i wonder how the application crashes down itself.
 
my device information shows below.
Model number:TC700H
Android version:4.4.3
kernel version:3.4.0
Build numner:01-23257-K-G-18-03-00 MV release-keys
 
customer information shows below.
Model number:TC700H
Android version:4.4.2
kernel version:3.4.0-g1be0e9e-00545-g96dd240
Build numne:01-23245-K-00-00-00-G1-112414 release-keys !
 
code and attach shows below
if (scanner != null) {
            try {
                scanner.cancelRead();
                scanner.disable();
            } catch (ScannerException e) {
                Log.e("Error", e.getMessage());
            }
            scanner.removeDataListener(this);
            try {
                scanner.release();
            }
            catch (Exception e) {
                Log.e("Error", e.getMessage());
            }
            scanner = null;
        }

Please register or login to post a reply

1 Replies

V Vedsatx Saddvv

Strange.  Looking around online I came across this post: exception - java.lang.IllegalAccessError: tried to access method - Stack Overflow .  The advice there was the application was built against a different version of a library than expected.  The first thing to do would be to ensure the two devices have the same build of the OS.  I still would not expect to see the exception however so I also suggest re-running with the latest version of the EMDK since EMDK 3.1 is several months old now.

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