pjsip java,pjsip库中的UnsatisfiedLinkError

I build Pjsip library and use its sample in android studio .

question

When I run that i got this error.How could I solve it ? thanks in advance.

exception

jsip.pjsua2.app E/AndroidRuntime: FATAL EXCEPTION: main

Process: org.pjsip.pjsua2.app, PID: 4360

java.lang.UnsatisfiedLinkError: No implementation found for void org.pjsip.pjsua2.pjsua2JNI.swig_module_init() (tried Java_org_pjsip_pjsua2_pjsua2JNI_swig_1module_1init and Java_org_pjsip_pjsua2_pjsua2JNI_swig_1module_1init__)

at org.pjsip.pjsua2.pjsua2JNI.swig_module_init(Native Method)

at org.pjsip.pjsua2.pjsua2JNI.(pjsua2JNI.java:2351)

at org.pjsip.pjsua2.Endpoint.(Endpoint.java:68)

at org.pjsip.pjsua2.app.MyApp.(MyApp.java:296)

at org.pjsip.pjsua2.app.MainActivity.onCreate(MainActivity.java:92)

at android.app.Activity.performCreate(Activity.java:5990)

at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332)

at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)

at android.app.ActivityThread.access$800(ActivityThread.java:156)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)

at android.os.Handler.dispatchMessage(Handler.java:102)

at android.os.Looper.loop(Looper.java:211)

at android.app.ActivityThread.main(ActivityThread.java:5389)

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:1020)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)

解决方案

It may happen for several reasons. First, check if you attached the native library correctly. For that create a folder named "jniLibs" into the projects

app/src/main/jniLibs

then put your armeabi architecture library like

armeabi/libpjsua2.so

for other architecture like armeabi-v7a use

armeabi-v7a/libpjsua2.so

like this.

there are other reasons may happen. If you build pjsip library for armeabi architecture only and running your application in an x86 architecture device then this error may occur. So check it also if you have built it for that application.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值