java.lang.UnsatisfiedLinkError when using agora.io Server Gateway Java SDK

  Kiến thức lập trình

I am building a simple demo with agora.io Server Gateway Java SDK.
I am using maven that downloads the lib linux-sdk-4.0.1.jar.
https://mvnrepository.com/artifact/io.agora.rtc/linux-sdk/4.0.1
Inside the jar I see the linux lib so.

    0  02-06-2023 11:59   native/
        0  02-06-2023 11:59   native/linux/
        0  02-06-2023 11:59   native/linux/x86_64/
   739728  02-06-2023 11:59   native/linux/x86_64/libagora-fdkaac.so
 17865952  02-06-2023 11:59   native/linux/x86_64/libagora_rtc_sdk.so
  3472144  02-06-2023 11:59   native/linux/x86_64/libagora-ffmpeg.so
  1556224  02-06-2023 11:59   native/linux/x86_64/libbinding.so

but when executing, the error happens.

java -cp target/agora-example-1.0-SNAPSHOT.jar:target/lib/linux-sdk-4.0.1.jar com.example.Main
App started
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'long io.agora.rtc.AgoraService.init()'
        at io.agora.rtc.AgoraService.init(Native Method)
        at io.agora.rtc.AgoraService.<init>(AgoraService.java:16)
        at com.example.Main.main(Main.java:31)

Where did I make the mistake?

I also checked the so file. It is likely not for Java JNI

1:16:35 ext_lib $ objdump -T libagora_rtc_sdk.so | grep Java_

 1:16:44 ext_lib $ //nothing related to Java was output

I also try the version 3.7.200.21 but it is the same.

New contributor

Dang Tuan Anh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT