Skip to content

Commit eb56300

Browse files
chrisbobbegnprice
authored andcommitted
android build: Update jsBundleDirRelease for AGP 7.1+, fixing crash on startup
This is a new incarnation of the same underlying React Native issue seen in 8f8a266 and 833d083, back in 2019 and 2018 respectively. RN hard-codes what intermediate directory it expects the Android Gradle Plugin to look for assets in; but that directory isn't any kind of stable API, and in fact it changes from time to time in new versions of AGP. It changed again in AGP 7.1.0. More recent versions of RN know about this latest change (with yet another hardcoding, conditioned on a new range of AGP versions): facebook/react-native#33057 But ours doesn't, because we haven't been updating RN for a while in this legacy codebase. So just update the directory we force it to. See discussion: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/release.20build.20missing.20JS.20bundle/near/1746718 [greg: expanded commit message]
1 parent 25b2bd6 commit eb56300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ apply plugin: "kotlin-android-extensions"
7979
project.ext.react = [
8080
enableHermes : false, // clean and rebuild if changing
8181
// quasi-unstable: see commits 8f8a266af and 833d083a9
82-
jsBundleDirRelease: "$buildDir/intermediates/merged_assets/release/out"
82+
jsBundleDirRelease: "$buildDir/intermediates/assets/release/mergeReleaseAssets"
8383
]
8484

8585
apply from: "../../node_modules/react-native/react.gradle"

0 commit comments

Comments
 (0)