java.lang.UnsatisfiedLinkError:
so库报错:
java.lang.UnsatisfiedLinkError: No implementation found for long jssc.SerialNativeInterface.openPort(java.lang.String, boolean) (tried Java_jssc_SerialNativeInterface_openPort and Java_jssc_SerialNativeInterface_openPort__Ljava_lang_String_2Z)
at jssc.SerialNativeInterface.openPort(Native Method)
at jssc.SerialPort.openPort(SerialPort.java:160)
at com.gemvary.outdoor.mcu.McuJssc.init(McuJssc.java:68)
at com.gemvary.outdoor.MyApplication.onCreate(MyApplication.java:57)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5425)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThreadMethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
解决:1、查找app安装内lib已存在该so库
2、发现原来没有把so库load进来
System.loadLibrary("jssc");