javaandroidkotlinlinphonelinphone-sdk

java.lang.UnsatisfiedLinkError: dlopen failed: /base.apk!/lib/arm64-v8a/libmediastreamer.so" on linphone-sdk-android:5.2.70


I am currently trying to integrate the LinPhone SDK 'org.linphone:linphone-sdk-android:5.2.70' into my application. When I try to initiate the factory

    fun initCore() {
       val factory = Factory.instance()
       factory.setDebugMode(true, "Hello Linphone")
       core = factory.createCore(null, null, getApplication())
    }

I am getting the following error:

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~etnr80db3rwY6xyBglTUnA==/package_id-XCdnucrbTwRLEvQ0pmlAmw==/base.apk!/lib/arm64-v8a/libmediastreamer.so"

Any insight on this is highly appreciated. Please let me know if further information is required for better clarification.


Solution

  • After investigating the issue, I have found out that the problem is within the Gradle dependency configuration where the required .so files are not being downloaded correctly. I have followed the following steps to resolve the issue

    1. First, I downloaded the latest SDK from this link.

    2. Copied the .aar file to the libs directory of my project.

    3. In the app-level build.gradle file included the .aar file:

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
        // other dependencies
    }