[0.71] Release of React Native 0.71 is currently blocked by an AGP stable release
See original GitHub issueDescription
Hey all, I’m opening this issue to track the current status of a blocker for the release of React Native 0.71.x. We’ll use this issue to track the status and decide what to do next.
The problem
We’re about to ship 0.71.0
with a version of AGP (Android Gradle Plugin) which is 7.4.0-beta05
, the last known version of AGP that is working with the current setup of React Native.
This has the unfortunate side effect that users will be able to open newly created projects only inside Android Studio Electric Eel version 7.4.0-beta05. When opening such a project with a different version of Android Studio (say 7.4.0 stable), they’ll be prompted to “update” their Android project to the corresponding version, resulting in a build failure.
Overview of AGP versions
Specifically, the offending API is the addGeneratedSourceDirectory
method used to inject the JS bundle and the static asset inside the final APK:
We’ve been investigating AGP versions and if we can use another non-broken versions of AGP. Here an overview.
7.2.x
-> Unusable as theaddGeneratedSourceDirectory
was not there7.3.x
-> Unusable asaddGeneratedSourceDirectory
is broken for resources. This was causing #35439 on our previous RC. A fix has been shipped by Google’s, and is available in7.4
. I’ve asked for a backport of the fix in7.3
but it seems like there are no more7.3.x
releases planned.7.4.0-beta05
-> That’s the last AGP version where this API is working (the one we’re about to ship).7.4.0-rc01
-> Unusable asaddGeneratedSourceDirectory
got broken inside RC01. I’ve reported the issue and got it fixed (which is great!)7.4.0
-> Unusable as the fix for the broken API won’t land in.0
but we’ll have to wait for7.4.1
apparently.7.4.1
-> Seems like we’ll have to wait for this version (sadly we don’t have an ETA from Google’s end on this).
Version
0.71.0
Issue Analytics
- State:
- Created 9 months ago
- Reactions:7
- Comments:5 (2 by maintainers)
(the commit will land in 0.71 RC5)
We ended up de-bumping AGP to 7.3 to unblock the release of RN 0.71 as Google is not providing any ETA on AGP 7.4 and the current releases are all broken.
The de-bump is circumventing the broken APIs on AGP 7.3 so we should be good to go. This will also allow to open RN projects on .71 with both Android Studio Electric Eel and Dolphin.