我尝试将pjSIP包含到我的项目中,最后让它与Gradle正确同步。
但是当我尝试根据the example code from this documentation定义端点时,我得到了UnsatisfiedLinkError
。这是否意味着我的项目错过了某些文件,或者这里发生了什么?我实现了pjSIP项目中swig构建的所有文件,除了example-app。
完整错误如下所示:
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.<clinit>(pjsua2JNI.java:2159)
at org.pjsip.pjsua2.Endpoint.<init>(Endpoint.java:68)
at replacelater.telephonapp.MainActivity.initPJSIP(MainActivity.java:145)
at replacelater.telephonapp.MainActivity.onCreate(MainActivity.java:134)
at android.app.Activity.performCreate(Activity.java:5953)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
at android.app.ActivityThread.access$800(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5312)
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:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
我在这里缺少什么?
答案 0 :(得分:0)
未加载PJSUA本机库。请在启动应用程序时加载库。