繁体   English   中英

linphone android登录错误java.lang.UnsatisfiedLinkError:找不到本机方法

[英]linphone android login error java.lang.UnsatisfiedLinkError: Native method not found

我正在尝试使用新版本和最新的Linphone库。

我的库编译正常,但是当我在模拟器中运行它时,它会崩溃并返回:

4-22 07:28:32.250: W/dalvikvm(1262): No implementation found for native Lorg/linphone/core/LinphoneCoreFactoryImpl;.setLogCollectionPath:(Ljava/lang/String;)V
04-22 07:28:32.250: D/AndroidRuntime(1262): Shutting down VM
04-22 07:28:32.250: W/dalvikvm(1262): threadid=1: thread exiting with uncaught exception (group=0xb3ac7b90)
04-22 07:28:32.260: E/AndroidRuntime(1262): FATAL EXCEPTION: main
04-22 07:28:32.260: E/AndroidRuntime(1262): Process: org.linphone, PID: 1262
04-22 07:28:32.260: E/AndroidRuntime(1262): java.lang.UnsatisfiedLinkError: Native method not found: org.linphone.core.LinphoneCoreFactoryImpl.setLogCollectionPath:(Ljava/lang/String;)V
04-22 07:28:32.260: E/AndroidRuntime(1262):     at org.linphone.core.LinphoneCoreFactoryImpl.setLogCollectionPath(Native Method)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at org.linphone.LinphoneService.onCreate(LinphoneService.java:136)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2553)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at android.app.ActivityThread.access$1700(ActivityThread.java:135)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1479)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at android.os.Handler.dispatchMessage(Handler.java:102)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at android.os.Looper.loop(Looper.java:137)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at android.app.ActivityThread.main(ActivityThread.java:4998)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at java.lang.reflect.Method.invokeNative(Native Method)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at java.lang.reflect.Method.invoke(Method.java:515)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
04-22 07:28:32.260: E/AndroidRuntime(1262):     at dalvik.system.NativeStart.main(Native Method)

我遇到以下问题,可以通过使用以下解决方案解决问题:

转到子模块/linphone/coreapi/linphonecore_jni.cc

编辑linphonecore_jni.cc文件。

更改是-将JNIEXPORT替换为extern "C"并删除所有功能的JNICALL关键字。

在您的情况下, setLogCollectionPathlinphonecore_jni.cc文件中找到函数setLogCollectionPath并对 setLogCollectionPath函数进行以上更改。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM