I am doing a shortcut wrap for someone to see if the demo activity is working on a PDA401 device. I have worked with .so files before so my SLC structure looks as follows (same as with other projects that I have done):
401DEMO
It compiles without any problem but when I "kick start" the external Demo Activity I get the following error:
So, it looks like it is looking for the .so file in the "arm" folder while no such folder exists in the SDK that I have downloaded. Only folder armeabi which contains libzyapi_common.so exits in the SDK that I have downloaded.
Can anyone help to please solve this mystery?
401DEMO
additional
libzyapi_common.so is loaded in:lib
libsarmeabi
libzyapi_common.so
android-support-v4.jar
srcandroid
........
com........
pda401wrapperpda401Wrapper.java
B4X:
package android.zyapi;
public class CommonApi {
private static CommonApi mMe = null;
public CommonApi() {
}
// gpio
public native int setGpioMode(int pin, int mode);
public native int setGpioDir(int pin, int dir);
public native int setGpioPullEnable(int pin, int enable);
public native int setGpioPullSelect(int pin, int select);
public native int setGpioOut(int pin, int out);
public native int getGpioIn(int pin);
//serialport
public native int openCom(String port, int baudrate,int bits,char event,int stop);
public native int openComEx(String port, int baudrate,int bits,char event,int stop, int flags);
public native int writeCom(int fd, byte[] buf, int sizes);
public native int readCom(int fd, byte[] buf, int sizes);
public native int readComEx(int fd, byte[] buf, int sizes, int sec, int usec);
public native void closeCom(int fd);
static {
System.loadLibrary("zyapi_common");
}
}
It compiles without any problem but when I "kick start" the external Demo Activity I get the following error:
B4X:
java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/JHS.PDA401-2/lib/arm/libzyapi_common.so"
at java.lang.Runtime.loadLibrary(Runtime.java:371)
at java.lang.System.loadLibrary(System.java:988)
at android.zyapi.CommonApi.<clinit>(CommonApi.java:26)
at com.qs.service.ScanService.initGPIO(ScanService.java:172)
at com.qs.service.ScanService.onCreate(ScanService.java:41)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3001)
at android.app.ActivityThread.access$1800(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1553)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5643)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
So, it looks like it is looking for the .so file in the "arm" folder while no such folder exists in the SDK that I have downloaded. Only folder armeabi which contains libzyapi_common.so exits in the SDK that I have downloaded.
Can anyone help to please solve this mystery?