0

I am attempting to write an android application (in Android Studio 1.3) to be installed on a Beaglebone Black using the android_serialport_api. I am new to NDK, and have been struggling quite a bit. The issue that I am now running into is accessing the library (libserial_port.so) from the SerialPort.java file. I have tried this approach, but still have no luck. When I run the project, it compiles cleanly, opens, and then when a serial port is accessed I get the error:

java.lang.ExceptionInInitializerError...
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load serial_port.so from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.example.blake.serialport2-1.apk,libraryPath=/data/app-lib/com.example.blake.serialport2-1]: findLibrary returned null 

I cannot for the life of me figure this out. I know that there are some answers that address portions of this question, but I was hoping that someone had experience with my particular issue.

Cœur
  • 37,241
  • 25
  • 195
  • 267
BlakeA
  • 3
  • 2
  • Where is the .so file located on the device, and how are you trying to load it? – Michael Jun 24 '15 at 07:47
  • the .so file is currently being autogenerated at run time and placed in the: Project/app/build/intermediates/exploded-aar/serialPort2/android-serialport-api/jni/ameabi file. The SerialPort.java file attempts to load it with: Syste.loadLibrary("serial_port.so"); – BlakeA Jun 24 '15 at 14:43

0 Answers0