4 Commits

Author SHA1 Message Date
ngnahtn 46b71fbe22 fix(android): guard onDetachedFromEngine NPE when libmmkv.so missing for ABI
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().
2026-09-07 16:51:36 +07:00
宫绫 d70fca377a Fix and optimize for Flutter Android
Remove unused imports and fix deprecated implementations.
2025-02-03 10:15:23 +08:00
guoling 0f1fc97711 try load libmmkv.so before dart attach 2024-06-21 20:13:58 +08:00
guoling 1883e65ec0 add mmkv_android 2024-04-18 17:47:22 +08:00