gpt4 book ai didi

android - PJSUA2 sip android 原生应用

转载 作者:行者123 更新时间:2023-12-03 20:20:47 28 4
gpt4 key购买 nike

在这里,我正在为 android 的 ubuntu 14.04LTS eclipse adt 中使用 native android 开发一个应用程序。

构建、配置并使一切变得完美。

之后,我将 pjsua2 示例应用程序导入 Eclipse,然后添加了 native 库支持,但是当我在模拟器上运行时,它会引发错误。

错误日志,

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: 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 10-25 06:12:09.489: E/AndroidRuntime(1571): at java.lang.Runtime.loadLibrary(Runtime.java:358) 10-25 06:12:09.489: E/AndroidRuntime(1571): at java.lang.System.loadLibrary(System.java:526) 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): at org.pjsip.pjsua2.app.MainActivity.onCreate(MainActivity.java:85) 10-25 06:12:09.489: E/AndroidRuntime(1571): at android.app.Activity.performCreate(Activity.java:5231) 10-25 06:12:09.489: E/AndroidRuntime(1571): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 10-25 06:12:09.489: E/AndroidRuntime(1571): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) 10-25 06:12:09.489: E/AndroidRuntime(1571): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 10-25 06:12:09.489: E/AndroidRuntime(1571): at android.app.ActivityThread.access$800(ActivityThread.java:135) 10-25 06:12:09.489: E/AndroidRuntime(1571): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 10-25 06:12:09.489: E/AndroidRuntime(1571): at android.os.Handler.dispatchMessage(Handler.java:102) 10-25 06:12:09.489: E/AndroidRuntime(1571): at android.os.Looper.loop(Looper.java:136) 10-25 06:12:09.489: E/AndroidRuntime(1571): at android.app.ActivityThread.main(ActivityThread.java:5017) 10-25 06:12:09.489: E/AndroidRuntime(1571): at java.lang.reflect.Method.invokeNative(Native Method) 10-25 06:12:09.489: E/AndroidRuntime(1571): at java.lang.reflect.Method.invoke(Method.java:515) 10-25 06:12:09.489: E/AndroidRuntime(1571): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 10-25 06:12:09.489: E/AndroidRuntime(1571): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 10-25 06:12:09.489: E/AndroidRuntime(1571): at dalvik.system.NativeStart.main(Native Method) 10-25 06:12:09.499: W/ActivityManager(403): Force finishing activity org.pjsip.pjsua2.app/.MainActivity 10-25 06:12:09.809: I/WindowManager(403): Screenshot max retries 4 of Token{b4148710 ActivityRecord{b41c4ef8 u0 org.pjsip.pjsua2.app/.MainActivity t2 f}} appWin=Window{b4086b40 u0 Starting org.pjsip.pjsua2.app} drawState=4 10-25 06:12:09.809: W/WindowManager(403): Screenshot failure taking screenshot for (480x800) to layer 21010 10-25 06:12:10.009: D/dalvikvm(403): GC_FOR_ALLOC freed 91K, 14% free 7331K/8436K, paused 72ms, total 74ms 10-25 06:12:10.359: W/ActivityManager(403): Activity pause timeout for ActivityRecord{b41c4ef8 u0 org.pjsip.pjsua2.app/.MainActivity t2 f} 10-25 06:12:10.719: I/Choreographer(403): Skipped 94 frames! The application may be doing too much work on its main thread. 10-25 06:12:10.869: I/Choreographer(581): Skipped 35 frames! The application may be doing too much work on its main thread. 10-25 06:12:11.599: I/Process(1571): Sending 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 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 could not load file: /system/media/audio/ui/Effect_Tick.ogg 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 could not load file: /system/media/audio/ui/Effect_Tick.ogg 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 could not load file: /system/media/audio/ui/Effect_Tick.ogg 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 could not load file: /system/media/audio/ui/Effect_Tick.ogg 10-25 06:12:11.669: E/SoundPool(403): error loading /system/media/audio/ui/KeypressStandard.ogg 10-25 06:12:11.669: W/AudioService(403): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg 10-25 06:12:11.669: E/SoundPool(403): error loading /system/media/audio/ui/KeypressSpacebar.ogg 10-25 06:12:11.669: W/AudioService(403): Soundpool could not load 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 file: /system/media/audio/ui/KeypressDelete.ogg 10-25 06:12:11.669: E/SoundPool(403): error loading /system/media/audio/ui/KeypressReturn.ogg 10-25 06:12:11.669: W/AudioService(403): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg 10-25 06:12:11.669: E/SoundPool(403): error loading /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 while loading samples 10-25 06:12:12.259: I/Choreographer(403): Skipped 171 frames! The application may be doing too much work on its main thread. 10-25 06:12:12.609: W/InputMethodManagerService(403): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@b410f460 attribute=null, token = android.os.BinderProxy@b405a130

最佳答案

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 文件夹路径中,但它找不到它,所以它抛出了上述错误。希望我的回答对某人有所帮助。

关于android - PJSUA2 sip android 原生应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26561508/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com