PJSUA2 sip Android App

Here I am developing an application using native Android in ubuntu 14.04LTS eclipse adt for Android.

Build, customize and make everything perfect.

After that, I imported the pjsua2 sample application into eclipse, then added support for the built-in library, but when I run the emulator, it gives an error.

Error log

10-25 06: 12: 09.489: E / AndroidRuntime (1571): FATAL EXCEPTION: main 10-25 06: 12: 09.489: E / AndroidRuntime (1571): Process: org.pjsip.pjsua2.app, PID: 1571 10 -25 06: 12: 09.489: E / AndroidRuntime (1571): java.lang.UnsatisfiedLinkError: Failed to load libpjsua2.so from the loader dalvik.system.PathClassLoader [DexPathList [[zip file] "/data/app/org.pjsip .pjsua2.app-2.apk "], nativeLibraryDirectories = [/ data / app-lib / org.pjsip.pjsua2.app-2, / vendor / lib, / system / lib]]]: findLibrary returns null 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with java.lang.Runtime.loadLibrary (Runtime.javahaps58) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with java.lang.System .loadLibrary (System.javaPoint26) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): at org.pjsip.pjsua2.app.MyApp. (MyApp.java:235) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with org.pjsip.pjsua2.app.MainActivity.onCreate (MainActivity.java:85) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with android.app.Activity.performCreate (Activity.javahaps2323) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1087) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with android.app.ActivityThread .performLaunchActivity (ActivityThread.java:2159) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2245) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with android.app.ActivityThread.access $ 800 (ActivityThread.java:135) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with android.app.ActivityThread $ H.handleMessage (ActivityThread .java: 1196) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with android.os.Handler.dispatchMessage (Handler.java:102) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with android.os.Looper.loop (Looper.java:136) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with android.app.ActivityThread.main (ActivityThread.java=017) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with java.lang.reflect.Method.invokeNative (native method) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with java.lang.reflect.Method.invoke (Method.javahaps15) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): when com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:779) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with com.android.internal.os.ZygoteInit.main (ZygoteInit .java: 595) 10-25 06: 12: 09.489: E / AndroidRuntime (1571): with dalvik.system.NativeStart.main (native method) 10-25 06: 12: 09.499: W / ActivityManager (403):forced finish activity org.pjsip.pjsua2.app/.MainActivity 10-25 06: 12: 09.809: I / WindowManager (403): max screenshot repeats 4 tokens {b4148710 ActivityRecord {b41c4ef8 u0 org.pjsip.pjsua2.app/.MainActivity t2 f}} appWin = Window {b4086b40 u0 Launch org.pjsip.pjsua2.app} drawState = 4 10-25 06: 12: 09.809: W / WindowManager (403): take screenshots screenshot for (480x800) up to layer 21010 10-25 06: 12: 10.009: D / dalvikvm (403): GC_FOR_ALLOC released 91K, 14% free 7331K / 8436K, suspended 72 ms, only 74 ms 10-25 06: 12: 10.359: W / ActivityManager (403): activity pause for ActivityRecord {b41c4ef8 u0 org.pjsip.pjsua2.app/.MainActivity t2 f} 10-25 06: 12: 10.719: I / Choreographer (403): missed 94 frames! An application can do too much work on its main thread. 10-25 06: 12: 10,869: I / Choreographer (581):missed 35 frames! An application can do too much work on its main thread. 10-25 06: 12: 11.599: I / Process (1571): Send signal. PID: 1571 SIG: 9 10-25 06: 12: 11.609: E / SoundPool (403): Error loading / system / media / audio / ui / Effect _Tick.ogg 10-25 06: 12: 11.609: W / AudioService ( 403): Soundpool could not load the file: / system / media / audio / ui / Effect _Tick.ogg 10-25 06: 12: 11.659: I / ActivityManager (403): Process org.pjsip.pjsua2.app (pid 1571) has died. 10-25 06: 12: 11.669: E / SoundPool (403): error loading / system / media / audio / ui / Effect _Tick.ogg 10-25 06: 12: 11.669: W / AudioService (403): Soundpool failed download file: / system / media / audio / ui / Effect _Tick.ogg 10-25 06: 12: 11.669: E / SoundPool (403): download errors / system / media / audio / ui / Effect _Tick.ogg 10-25 06: 12: 11.669: W / AudioService (403):Soundpool could not load the file: /system/media/audio/ui/Effect_Tick.ogg 10-25 06: 12: 11.669: E / SoundPool (403): loading errors / system / media / audio / ui / Effect _Tick.ogg 10 -25 06: 12: 11.669: W / AudioService (403): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 10-25 06: 12: 11.669: E / SoundPool (403): download errors / system / media / audio / ui / Effect _Tick.ogg 10-25 06: 12: 11.669: W / AudioService (403): Soundpool could not load the file: /system/media/audio/ui/Effect_Tick.ogg 10- 25 06: 12: 11.669: E / SoundPool (403): loading errors /system/media/audio/ui/KeypressStandard.ogg 10-25 06: 12: 11.669: W / AudioService (403): Soundpool could not load the file: /system/media/audio/ui/KeypressStandard.ogg 10-25 06: 12: 11.669: E / SoundPool (403): loading errors /system/media/audio/ui/KeypressSpacebar.ogg 10-25 06: 12: 11.669 :W / AudioService (403): Soundpool could not load the file: /system/media/audio/ui/KeypressSpacebar.ogg 10-25 06: 12: 11.669: E / SoundPool (403): error loading / system / media / audio / ui / KeypressDelete.ogg 10-25 06: 12: 11.669: W / AudioService (403): Soundpool could not load the file: /system/media/audio/ui/KeypressDelete.ogg 10-25 06: 12: 11.669: E / SoundPool (403): loading errors /system/media/audio/ui/KeypressReturn.ogg 10-25 06: 12: 11.669: W / AudioService (403): Soundpool could not load the file: / system / media / audio / ui / KeypressReturn.ogg 10-25 06: 12: 11.669: E / SoundPool (403): loading errors /system/media/audio/ui/KeypressInvalid.ogg 10-25 06: 12: 11.669: W / AudioService (403): Soundpool Could not load file: /system/media/audio/ui/KeypressInvalid.ogg 10-25 06: 12: 11.669: W / AudioService (403): onLoadSoundEffects (),Error -1 when loading samples 10-25 06: 12: 12.259: I / Choreographer (403): 171 frames missed! An application can do too much work on its main thread. 10-25 06: 12: 12.609: W / InputMethodManagerService (403): The window is already focused, ignoring focus amplification:com.android.internal.view.IInputMethodClient$Stub$Proxy@b410f460 attribute = null, token = android.os.BinderProxy@b405a130

+4
source share
3 answers

I followed this link https://github.com/VoiSmart/pjsip-android-builder to build pjsip, hoping this helps others, but still encounters some problems with video calls.

0
source
java.lang.UnsatisfiedLinkError: Couldn't load libpjsua2.so from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.pjsip.pjsua2.app-2.apk"],nativeLibraryDirectories=[/data/app-lib/org.pjsip.pjsua2.app-2, /vendor/lib, /system/lib]]]: findLibrary returned null

. Android libpjsua2.so JNILIBs, , . , -.

+1

. , pjsip, ndk. ndk pjsip.

0

All Articles