-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[0.71.0] Android release AAB static asset (image, video, not js bundle) missing #35865
Comments
I've just tested on a plain 0.71 project as follows:
I can see that Also your 2 screenshots are a bit confusing as I see they mention APK size, while I believe the problem you're referring to is to .aab Plus in the second screenshot I see you still have |
I am seeing the same issue with our app after upgrading to 0.71. There is a |
After further investigation this is actually a valid bug. |
Summary: When downgrading from AGP 7.4 to 7.3 we were forced to resort to older APIs to bundle resources. It seems like we haven't properly wired the task to make sure resources generated by Metro are correctly accounted before the generation of release app bundles/apks. This fixes it. This fix can also be removed once we are on AGP 7.4 Fixes facebook#35865 Changelog: [Android] [Fixed] - Fix for resources not correctly bundlded on release appbundles Differential Revision: D42573450 fbshipit-source-id: f3f3ed228788e9c406e066b63e70f20fd0f4daeb
@cortinico your pR https://github.com/facebook/react-native/pull/35872/files changes fixed this issue. For me even assemblerelease also had missing static assets. Thanks |
Summary: Pull Request resolved: #35872 When downgrading from AGP 7.4 to 7.3 we were forced to resort to older APIs to bundle resources. It seems like we haven't properly wired the task to make sure resources generated by Metro are correctly accounted before the generation of release app bundles/apks. This fixes it. This fix can also be removed once we are on AGP 7.4 Fixes #35865 Changelog: [Android] [Fixed] - Fix for resources not correctly bundlded on release appbundles Reviewed By: cipolleschi Differential Revision: D42573450 fbshipit-source-id: a810924315f72e02e4c988ae86112bf0a06a9ce5
…ook#35872) Summary: Pull Request resolved: facebook#35872 When downgrading from AGP 7.4 to 7.3 we were forced to resort to older APIs to bundle resources. It seems like we haven't properly wired the task to make sure resources generated by Metro are correctly accounted before the generation of release app bundles/apks. This fixes it. This fix can also be removed once we are on AGP 7.4 Fixes facebook#35865 Changelog: [Android] [Fixed] - Fix for resources not correctly bundlded on release appbundles Reviewed By: cipolleschi Differential Revision: D42573450 fbshipit-source-id: a810924315f72e02e4c988ae86112bf0a06a9ce5
I'm settling on RN v0.69.10 owing to some dependencies not fully caught up with the latest RN version. Strangely, all my RN apps that don't have But for those in which I have For now, I'm using the temp solution similar to the one above as provided by @mym0404. But there is a And so after applying the fix for So, I'm stuck here. Any help on solving this will be greatly appreciated! |
Still experiencing this in 0.72.6, at the moment I noticed that sometimes I had to run Finally the important thing is I had to make sure metro command is executed in the compile process: |
Description
I bumped RN from
0.70.2
to0.71.0
When I bundle
.aab
, our local resources assets(image, video, ...) is missing.I bundled aab with the command
./gradlew bundleRelease
.I know that I don't have to manually run command
react-native bundle ...
.But when I build an
.apk
file with./gradlew assembleRelease
, then it works well.Also, in my CD build log, assets are bundled like that.
There is no problem with the JS bundle(
index.android.bundle
) but static resources.I tried
shrinkResources false
but no luck.Anyway, this issue can be fixed temporarily with bundle asset manually with
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
command before./gradlew bundleRelease
.Version Info
0.71.0
7.4.0
0.73.5
app/build.gradle
Version
0.71.0
Output of
npx react-native info
Steps to reproduce
./gradlew bundleRelease
Snack, code example, screenshot, or link to a repository
The following screenshots are Android Studio apk analyzer.
The apk files are downloaded from Google play console [App bundle explorer] - [Download] - [Signed, universal APK]
I uploaded binary to Google play console as
.aab
.Build with
0.71.0
- Res excludedBuild with
0.70.2
- Res includedThe text was updated successfully, but these errors were encountered: