美文网首页
java.lang.UnsatisfiedLinkError:

java.lang.UnsatisfiedLinkError:

作者: Gao秋 | 来源:发表于2021-03-31 17:15 被阅读0次

    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");

    相关文章

      网友评论

          本文标题:java.lang.UnsatisfiedLinkError:

          本文链接:https://www.haomeiwen.com/subject/mantkltx.html