pjsip库

时间:2015-12-06 09:13:03

标签: android pjsip unsatisfiedlinkerror

我构建了Pjsip库并在android studio中使用它的示例。

问题

当我跑步时,我收到了这个错误。我怎么能解决它?提前谢谢。

例外

  

jsip.pjsua2.app E / AndroidRuntime:FATAL EXCEPTION:main                                                                       处理:org.pjsip.pjsua2.app,PID:4360                                                                       java.lang.UnsatisfiedLinkError:找不到void org.pjsip.pjsua2.pjsua2JNI.swig_module_init()的实现(尝试过Java_org_pjsip_pjsua2_pjsua2JNI_swig_1module_1init和Java_org_pjsip_pjsua2_pjsua2JNI_swig_1module_1init__)                                                                           at org.pjsip.pjsua2.pjsua2JNI.swig_module_init(原生方法)                                                                           在org.pjsip.pjsua2.pjsua2JNI。(pjsua2JNI.java:2351)                                                                           在org.pjsip.pjsua2.Endpoint。(Endpoint.java:68)                                                                           在org.pjsip.pjsua2.app.MyApp。(MyApp.java:296)                                                                           在org.pjsip.pjsua2.app.MainActivity.onCreate(MainActivity.java:92)                                                                           在android.app.Activity.performCreate(Activity.java:5990)                                                                           在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)                                                                           在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332)                                                                           在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)                                                                           在android.app.ActivityThread.access $ 800(ActivityThread.java:156)                                                                           在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1351)                                                                           在android.os.Handler.dispatchMessage(Handler.java:102)                                                                           在android.os.Looper.loop(Looper.java:211)                                                                           在android.app.ActivityThread.main(ActivityThread.java:5389)                                                                           at java.lang.reflect.Method.invoke(Native Method)                                                                           在java.lang.reflect.Method.invoke(Method.java:372)                                                                           在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1020)                                                                           在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)

1 个答案:

答案 0 :(得分:4)

可能有几个原因。首先,检查是否正确附加了本机库。为此创建一个名为" jniLibs"的文件夹。进入项目

  

应用程序/ SRC /主/ jniLibs

然后把你的armeabi架构库像

  

armeabi / libpjsua2.so

对于像armeabi-v7a这样的其他架构使用

  

armeabi-v7a / libpjsua2.so

像这样。

还有其他原因可能发生。如果仅为pjsip体系结构构建armeabi库并在x86体系结构设备中运行应用程序,则可能会发生此错误。如果您已为该应用程序构建它,请检查它。