java.lang.UnsatisfiedLinkError:

2021-03-31  本文已影响0人  Gao秋

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.ActivityThreadH.handleMessage(ActivityThread.java:1551) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6141) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInitMethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)

解决:1、查找app安装内lib已存在该so库
2、发现原来没有把so库load进来
System.loadLibrary("jssc");

上一篇下一篇

猜你喜欢

热点阅读