Flutter and Supported device issues

Hello,

We had native Android and iOS apps and recently transitioned to a cross-platform solution with Flutter. To avoid rewriting the entire app, we created a Flutter module and integrated it into our native apps.

However, a few issues have come up, and it’s unclear if they are related to adding Flutter or a potential Google Play bug.

  1. Google Play Compatibility Issue:
    Some users report that Google Play displays “This app won’t work on your device,” preventing them from installing or updating the app. I can reproduce this issue on both a Pixel 8 emulator and a real device. Strangely, if I download the universal APK from the Google Play Console, it installs on the same devices without issue.

My initial thought was that this could be related to Flutter’s lack of x86 support in release mode. However, the Pixel 8 uses an arm64-v8a architecture, which should be supported.

  1. libflutter.so Loading Error:
    We’re seeing an error related to loading libflutter.so:
Unable to create application com.storyshots.android.StoryShotsApp: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException: Could not load libflutter.so. This may be due to the app running on an architecture Flutter doesn’t support (e.g., x86). See https://docs.flutter.dev/deployment/android#what-are-the-supported-target-architectures for more details.
App is using CPU architecture: i686, and the native libraries directory (path /data/app/com.storyshots.android-ZWLwd_JeOm_1ygI854kPSA==/lib/x86) contains the following files: null

If Google Play is filtering out unsupported architectures, why would this crash still occur?

To address this, I’ve added ndk.abiFilters "armeabi-v7a", "arm64-v8a", "x86_64" to the app/build.gradle file in the host app. It didn’t help.

Any guidance or insights would be greatly appreciated.

Thank you!