Skip to content

UnsatisfiedLinkError in SecureNativeApi.doCommandNative on Some Devices #50

@hmmeral

Description

@hmmeral

Description:
We are encountering the following fatal exception on some devices:

Fatal Exception: java.lang.UnsatisfiedLinkError No implementation found for java.lang.Object com.thingclips.smart.security.jni.SecureNativeApi.doCommandNative(android.content.Context, int, byte[], byte[], boolean) (tried Java_com_thingclips_smart_security_jni_SecureNativeApi_doCommandNative and Java_com_thingclips_smart_security_jni_SecureNativeApi_doCommandNative__Landroid_content_Context_2I_3B_3BZ)

Upon investigation, I found that the security-algorithm.aar file needs to be included in the project. I have already added the appropriate debug and release packages under the libs directory and ensured that the security-algorithm.aar files are included for both build variants. Additionally, I have configured build.gradle as follows:

buildTypes {
    debug {
        ......
        dependencies {
            debugImplementation fileTree(dir: 'libs/debug', include: ['*.aar'])
        }
    }

    release {
        ......
        dependencies {
            releaseImplementation fileTree(dir: 'libs/release', include: ['*.aar'])
        }
    }
}

I have also applied the ProGuard rules as specified in the integration documentation. However, some users are still encountering this issue. The error does not seem to be tied to a specific device model or Android OS version, as it occurs across a wide range of devices.

Any insights or suggestions on resolving this issue would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions