Skip to content

Sdk initialization fails on flutter for android-x86_64 emulated device #425

@scvin2

Description

@scvin2

The flutter run log clearly shows that x86_64/librac_commons.so and x86_64/libc++_shared.so are downloaded

flutter run
Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
📦 Remote mode: Downloading RACommons Android native libraries...
Downloading from: https://github.com/RunanywhereAI/runanywhere-sdks/releases/download/commons-v0.1.6/RACommons-android-v0.1.6.zip
✅ Downloaded successfully
✓ x86_64/libsherpa-onnx-jni.so
✓ x86_64/libsherpa-onnx-c-api.so
......
✓ x86_64/librac_backend_onnx_jni.so
✓ arm64-v8a/libsherpa-onnx-jni.so
....
✓ arm64-v8a/librac_backend_onnx_jni.so
✓ x86_64/librunanywhere_jni.so
✓ x86_64/libomp.so
✓ x86_64/libc++_shared.so
.....
✓ arm64-v8a/libc++_shared.so
✓ x86_64/librac_commons.so
.....
✓ x86_64/libc++_shared.so

But, the SDK initialization fails with the following error when I try to run my flutter app on an android-x86_64 emulated device:

I/flutter ( 4808): [ERROR] [RunAnywhere.Init] ❌ SDK initialization failed: Invalid argument(s): Could not load librac_commons.so on Android: Invalid argument(s): Failed to load dynamic library 'librac_commons.so': dlopen failed: "/data/app/~~xSPG2F5e89myLG1Gh_s5AQ==/com.example.mage_frontend-PxOYI8vq_d4zEhhAP6AdJg==/base.apk!/lib/x86_64/libc++_shared.so" is for EM_AARCH64 (183) instead of EM_X86_64 (62). Ensure the native library is built and placed in jniLibs.
I/flutter ( 4808): [DEBUG] [TelemetryService] Event tracked: sdk_initialized
I/flutter ( 4808): [DEBUG] [TelemetryService] Event tracked: error

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