简体   繁体   中英

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

I am trying to use a new version and libraries of the latest linphone.

My libraries compiled ok, but when I run it in emulator it crushes and returns:

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)

I face same issue I have resolved issue by using Below solution:

Go to submodules/linphone/coreapi/linphonecore_jni.cc

Edit linphonecore_jni.cc file.

The change is - replace JNIEXPORT with extern "C" and remove JNICALL keyword for all function.

In your case find function setLogCollectionPath from linphonecore_jni.cc file and do above changes for setLogCollectionPath function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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