-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hash mismatch when using Android Hybrid app #2369
Comments
@vineetpal88 notes that it worked for their friend on Mac, but not on their own windows machine. |
There is also a support thread for this issue on Discord: https://discord.com/channels/1030243211995791380/1239852081343631412 |
I too face the exact similar issue. What is remote packaging as mentioned as solved in the other thread? It is not working for me in both mac as well as windows. I am using the aar from the flutter module's release folder exactly as mentioned in the doc. ` code_cache/shorebird_updater/downloads/1.full", expected: 123df52fb3b03d6a98417bd7ead446fca0434376359108b275d83e0e3c9dbb2e, got: 27be7b08def3f91618e74b59c9953f7825d0fc43ae73cd827cad8df4cbadd53b` |
I am using Windows 11, Android studio Android Studio Koala | 2024.1.1 Patch 1
I could reproduce the issue with the sample https://github.com/shorebirdtech/samples/tree/main/add_to_app as well.
` |
I followed the instructions exactly as mentioned here. 🚀 Ready to create a new release! 📱 App: my_flutter_module (8928d6c7-0043-4c16-ab6e-0981fb9bc494) Would you like to continue? (y/N) Yes ✅ Published Release 1.0.0+2! Your next steps:
Note: The maven url needs to be a relative path from your settings.gradle file to the aar library. The code below assumes your Flutter module is in a sibling directory of your Android app.
To create a patch for this release, run shorebird patch --platforms=aar --release-version=1.0.0+2 🚀 Ready to publish a new patch! 📱 App: my_flutter_module (8928d6c7-0043-4c16-ab6e-0981fb9bc494) Would you like to continue? (y/N) Yes ✅ Published Patch 1! The patch is uploaded correctly. But I don't know what could cause the patch difference. |
Was able to reproduce this locally. After looking through our CLI code, nothing is jumping out at me as obviously wrong. I'm going to poke around in our updater code later to see if there are any clues there. |
It appears as though the hash of the My machine:
The emulator:
On the bright side, these are the numbers I see in the error message after creating a patch with no changes, so that part looks like it's working correctly. Error message:
|
On a lark, I tried reproducing with an older version of Flutter (3.22.3), and the issue reproduces there as well. |
WorkaroundSetting the project's Obviously, we should support newer versions of android as well, and Flutter seems to have been targeting 34 for a little while now. |
I have the targetSdk set to 33. But compileSdk to 34. I still have the same issue |
This should be fixed by updating your app's build.gradle like so: buildTypes {
release {
// ...
// Add this line
packaging.jniLibs.keepDebugSymbols.add("**/libapp.so")
}
} Please reopen if this does not work. |
@bryanoltman Thanks a lot for solving this. Works well. |
Hi @bryanoltman @yilugesanghua i am also facing the same problem. I am following this link https://docs.shorebird.dev/guides/hybrid-apps/android/ for generating the aar. I am successfully generate the aar (shorebird release aar --release-version 1.0.25+90). I am generating the aar from different flutter project. Now i am open my native android project and updated settings.gradle file
Now updating project level build.gradle file and pasting these lines:
My app level build.gradle file:
After that syncing the project . i am installing the release apk on my device. Its successful install on my device.
Now i am creating patch request (shorebird release aar --release-version 1.0.25+90). Its successfully generate the patch and shows on shorebird console.
Now i am killing the app and launch it again. I am getting this error:
I tried multiple times to open and close the app. Please help me. I am facing problem from last three days.
@yilugesanghua how you resolve this. what is remote packaging. can you also please help me on this.
We will be very grateful to you.
Originally posted by @vineetpal88 in #2232 (comment)
The text was updated successfully, but these errors were encountered: