Hi Shorebird team,
I'm experiencing a persistent binary mismatch error when using Shorebird with Flutter add-to-app (AAR) embedded in a native Android project.
Setup:
- Flutter module built as AAR using: shorebird release android --platforms aar
- Native Android app consumes the AAR
- Flutter version: 3.29.3 (fb8d194ceb)
- Shorebird CLI: latest
Error from device logcat:
"This app reports version 4.2.16.12+23041812, but the binary is different
from the version submitted to Shorebird. hash mismatch."
What I found:
- The AAR module file declares dependency: io.flutter/arm64_v8a_release:1.0.0-c4daf6fc...
- The built APK contains libflutter.so (standard Flutter engine)
- libshorebird_engine.so is NOT present in the APK
- Even with maven { url 'https://download.shorebird.dev/download.flutter.io' }
placed BEFORE Flutter storage in build.gradle, Gradle still resolves libflutter.so
from Flutter storage (cached)
Question:
For add-to-app AAR integration, how do we ensure the native Android APK
uses the Shorebird engine instead of the standard Flutter engine?
Is there specific Gradle configuration required beyond adding the Shorebird maven URL?
Thank you!