-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Fix crash on release versions after AGP 7.3 bump #34797
Conversation
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was successfully merged by @cortinico in 6125f1f. When will my fix make it into a release? | Upcoming Releases |
Thanks for this. I updated from 7.2.1 to 7.3.1 and ran into this. React Native 0.70.3 still does not have this patch included so for now used |
I would highly encourage you to don't use |
I thought it was needed due to a library that I included that relies on the newest kotlin version. Android Studio complained that it requires a more recent version of the gradle plugin. |
Nope it's not. Android Studio is really eager in asking you to always update AGP, resulting in actually breaking your project sadly :/ I'm investigating if we can turn off those dialogs for React Native projects by hiding the AGP version. |
i got this issue this week, I upgraded RN to 0.70.7 and set buildToolsVersion to 33 because I make postnotifications permission requests for Android 13. My temporary solution is downgrade to 7.2.1 |
Or you can update React Native to 0.71 which has supports for this out of the box |
My app is a bare expo and the SDK version is currently 47. maybe I need to hold it until I upgrade to SDK 48. |
Summary: Release versions are currently broken on `main`. This happened once we bumped the AGP version to 7.3. It seems like that the path we used to use for assets has changed. The app build successfully but it fails to start as it can't load the bundle. This is also causing the hermes e2e test to fail: facebook/hermes#821 ## Changelog [Android] [Fixed] - Fix crash on release versions after AGP 7.3 bump Pull Request resolved: facebook#34797 Test Plan: Tested this locally and it works fine with RN Tester (can run a release version of it). Plus, inspecting the zip: ### Before ``` $ unzip -l packages/rn-tester/android/app/build/outputs/apk/hermes/release/app-hermes-arm64-v8a-release.apk | grep android.bundle 1248608 01-01-1981 01:01 assets/mergeHermesReleaseAssets/RNTesterApp.android.bundle ``` ### After ``` $ unzip -l packages/rn-tester/android/app/build/outputs/apk/hermes/release/app-hermes-arm64-v8a-release.apk | grep android.bundle 1248608 01-01-1981 01:01 assets/RNTesterApp.android.bundle ``` Reviewed By: cipolleschi Differential Revision: D39847369 Pulled By: cortinico fbshipit-source-id: 0e21c0b6e58b49ac097c59223649b74b2879b5e5
Summary
Release versions are currently broken on
main
. This happened once we bumped the AGP version to 7.3. It seems like that the path we used to use for assets has changed.The app build successfully but it fails to start as it can't load the bundle.
This is also causing the hermes e2e test to fail: facebook/hermes#821
Changelog
[Android] [Fixed] - Fix crash on release versions after AGP 7.3 bump
Test Plan
Tested this locally and it works fine with RN Tester (can run a release version of it).
Plus, inspecting the zip:
Before
After