Files
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
..