0
votes

Here I'm working in a native sip implement.

I followed the getting started pjsip for android from here:

https://trac.pjsip.org/repos/wiki/Getting-Started/Android

Everything made and built perfect. But when I started the app, it give me the following exception:

01-21 22:21:55.374      664-664/org.pjsip.pjsua2.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: Couldn't load pjsua2 from loader dalvik.system.PathClassLoader[dexPath=/data/app/org.pjsip.pjsua2.app-1.apk,libraryPath=/data/app-lib/org.pjsip.pjsua2.app-1]: findLibrary returned null
        at java.lang.Runtime.loadLibrary(Runtime.java:355)
        at java.lang.System.loadLibrary(System.java:525)
        at org.pjsip.pjsua2.app.MyApp.<clinit>(MyApp.java:272)
        at org.pjsip.pjsua2.app.MainActivity.onCreate(MainActivity.java:92)
        at android.app.Activity.performCreate(Activity.java:5372)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
        at android.app.ActivityThread.access$700(ActivityThread.java:159)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:176)
        at android.app.ActivityThread.main(ActivityThread.java:5419)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:525)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
        at dalvik.system.NativeStart.main(Native Method)

Someone of here PJSUA2 sip android native app says it could be the ndk version. I tried with: r10e and r8e

I am using Android Studio. I imported from eclipse creating Gradle file from it, after opened with the android studio

2

2 Answers

0
votes

I think you faced the same problem i answered before. Try using like this in android studio. You have to include native library in android studio.Please check this answer.Pjsip unstisfiedlinker error

0
votes

Its a slight bit off topic, but this thread has usefull info about building the pjsua2 project: enter link description here