mirror of
https://github.com/Tencent/MMKV.git
synced 2026-10-16 20:21:12 +08:00
46b71fbe22
The published com.tencent:mmkv AAR ships native libs for arm64-v8a and x86_64 only. On an armeabi-v7a / x86 device onAttachedToEngine() throws UnsatisfiedLinkError from loadLibrary() before `channel` is assigned. The engine keeps running, but on activity destroy FlutterEngineConnectionRegistry.removeAll() calls onDetachedFromEngine() unconditionally -> channel.setMethodCallHandler(null) -> NullPointerException -> "Unable to destroy activity" -> fatal crash on every app exit for that whole ABI class. - Catch the load failure so `channel` is still registered (MMKV method calls then fail gracefully through the existing FFI path). - Null-guard onDetachedFromEngine().