0

I downloaded the Getac Z710 Android tablet RFID library/jar from there web site. But after I called the init function:

05-19 19:23:45.315: E/AndroidRuntime(2469): FATAL EXCEPTION: main
05-19 19:23:45.315: E/AndroidRuntime(2469): java.lang.ExceptionInInitializerError
05-19 19:23:45.315: E/AndroidRuntime(2469):  at com.getac.lib.rfidreader.RfidTagReaderAPI.InitRFIDReader(RfidTagReaderAPI.java:118)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at example.com.MainActivity.onCreate(MainActivity.java:104)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android.app.Activity.performCreate(Activity.java:5008)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android.os.Looper.loop(Looper.java:137)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android.app.ActivityThread.main(ActivityThread.java:4745)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at java.lang.reflect.Method.invokeNative(Native Method)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at java.lang.reflect.Method.invoke(Method.java:511)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at dalvik.system.NativeStart.main(Native Method)
05-19 19:23:45.315: E/AndroidRuntime(2469): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load serial_port: findLibrary returned null
05-19 19:23:45.315: E/AndroidRuntime(2469):  at java.lang.Runtime.loadLibrary(Runtime.java:365)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at java.lang.System.loadLibrary(System.java:538)
05-19 19:23:45.315: E/AndroidRuntime(2469):  at android_serialport_api.SerialPort.<clinit>(SerialPort.java:69)
05-19 19:23:45.315: E/AndroidRuntime(2469):  ... 16 more

I tried other solutions for this, but still no luck. What would be the problem? They only have a limited documentation and support. TIA.

Nemesis
  • 5
  • 2
  • It appears to be trying (and failing) to load a shared library called "serial_port". Do you have that installed on the device (presumably in the app's "lib" directory)? – fadden May 20 '14 at 00:37
  • I already updated the latest firmware and still got the same error. I put the library at /libs folder. then properties-java build - path - libraries - add jars - order and export - check the library. – Nemesis May 20 '14 at 15:21
  • Nemesis, do you still have the link to the library? Could find it on their website. Thx – Thomas Nov 06 '14 at 14:30

2 Answers2

0

I had the same problem with the same device. Got it to work by downloading libserial_port.so from here, and copying it to myProject/libs/armeabi/. I'm using Eclipse.

Fredrik Hall
  • 308
  • 3
  • 5
0

This error mostly comes when your code/project is not able to find the System Library that you have included in your project. For that you need to re-build your .so file using NDK. So, you can re-build the .so file using NDK Plugins. Here are the steps for Using the NDK Plugins

Lalit Poptani
  • 67,150
  • 23
  • 161
  • 242