-
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
APK file size after latest updates (this issue was already reported but they're marked as closed) #24988
Comments
Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety? 👉 Click here if you want to take another look at the Bug Report issue template. |
I'm not sure exactly what caused the size increase but we did update JSC and added new architectures so it could be related to this. There might also be a regression and things we can improve so if someone can investigate what is causing the APK size to have gone up that would be great. In the meantime I suggest looking at https://developer.android.com/platform/technology/app-bundle to ship more optimized bundles, this will help remove the extra architectures that were added. |
Just to let you know, on RN 0.58.6 which only supports
it used use and also about gradle stuff:
which used to use I just compared 0.57.x with 0.58.6, things I mentioned are changed in 0.59 as well. |
You can use |
Is this solved ? |
Please use App Bundle, see https://developer.android.com/platform/technology/app-bundle |
Using App Bundle doesn't reduce significantly the size of the output file, for a clean project I have an .apk with size around 31MB, and compiling with : ./gradlew bundleRelease I get .aab with size around 28MB |
@lsancheztapia it doesn't matter how large is AAB. It is distribute for every platform independent. If you build it for 4 platform support. You should divide final size by 4 in average. |
@radeno which is still too much? and apk for each architecture has a size around 10mb, so its not just dividing by 4. and why is this issue closed? we are not even closed to solved status. |
@AmyrAhmady APK before RN 0.58 apps were builded for 2 platforms. So you uploaded two binary support in one APK. We should say it is 10MB size as base default. So if size with RN0.57 was 10mb, with RN0.59 it is about 20MB. which is corrent. But another Change. RN 0.57 has very old JSC and RN0.59 brings totally new JSC which is bigger. So larger APK or AAB is fine and correct. |
@radeno wrong. RN 0.57 supports so now here we are, lets compare them with each other: RN 0.57 - x86 platform output -> 4.7mb | armeabi-v7a ->3.5mb As you can see, only for those two platforms which are totally the same: so now what you are saying is basically, its JSC fault, which shouldnt come up with that much difference. |
I don't have energy to explain. Look at this chart: Red is RN0.57 JSC, Blue is RN0.59 JSC. Difference in size is about 5.3MB. 4,7 + ~5,3 ~= 10MB So? |
Ok, I understand the size of APK doubles because of 64 bit version. The problem is that my APK has more than 100mb (before 0.59 update it was a bit over 50mb. And because of this Google Play Sotre no longer accepts my APK saying it is too large. What should I do? After long hours updating 0.59 and all library incompatibilities, I can't publish my app. This is really frustrating. |
Maybe you have to use : https://developer.android.com/studio/projects/dynamic-delivery#customize_delivery , I don't know if RN supports it. |
Hey 👋
this issue was already reported multiple times but they're marked as closed.
The thing is, universal apk file is like 27mb now, which was around 7mb before for a clean react-native project.
even they added new architectures support such as
arm64-v8a
andx86_64
, that doesn't mean it should go this much high.Before latest updates it was around 7mb while it was supporting both
armeabi-v7a
andx86
. and for separated apk files, they were only 3mb and 5mb. but now after these latest updates they all changed and now evenx86
andarmeabi-v7a
are more than 7mb (which was the universal apk file size!)Might be helpful if someone who knows what to do to reduce release builds file size help us with it so others can find a way for it.
Yes I know you can generate separated apk files for each architecture. but they have bigger file size now as well, like I mentioned above.
related issues:
#24763
#23575
The text was updated successfully, but these errors were encountered: