When I installed rive native 0.0.1 and ran flutter run/ , I encounter the following error in t...
When I installed rive native 0.0.1 and ran flutter run/
, I encounter the following error in the debug console:
I/flutter (15999): Failed to load Rive file: Invalid argument(s): Failed to load dynamic library '/data/data/com.chongya.german/lib/librive_native.so': dlopen failed: library "/data/data/com.chongya.german/lib/librive_native.so" not found
I/Choreographer(15999): Skipped 42 frames! The application may be doing too much work on its main thread.
D/EGL_adreno(15999): eglMakeCurrent: 0x7fff6c06cd00: ver 3 1 (tinfo 0x7fff6c1bea40)
What this means:
At runtime, my app is unable to find and load the native dynamic library librive_native.so, which is required by the rive_native plugin. The dlopen system call fails because the .so file is missing from the expected path on the device.
However, when I run flutter build apk and manually install the generated APK, the app works fine and can load the Rive animation without errors.
In summary:
Running flutter run triggers a runtime error complaining that librive_native.so is missing.
The APK built by flutter build apk works correctly and includes the native .so library.
This means that during debug mode (flutter run), the native .so libraries required by rive_native might not be properly packaged or linked. But when I build the APK for release, these libraries are correctly included.