-
Notifications
You must be signed in to change notification settings - Fork 24.1k
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 size got increased almost double after upgrading to RN 0.66.0 #32463
Comments
|
What's your |
minSdkVersion 24 and have not changed it while upgrading react-native. |
I am also facing similar issue. App size on Playstore increased from 12 mb to 25 mb. |
@cortinico can it be due to all libraries staring to support api 30 from 29 ? |
So what could have happened is that in your bump, the minSdk version got moved from 21 to 23 (or above). React Native is specifying minSdkVersion 21, but if any of your library or your project is specifying a higher number, that will prevail. Specifically with api lvl 23, the native libraries are uncompressed in the APK, resulting in the an apparent bigger size of the APK (see here https://stackoverflow.com/a/63417612). The best to investigate this is if someone could create a reproduce on Github, adding a base commit on RN 0.64 and a subsequent commit with the bump to 0.66. That would greatly help investigate what happened. |
|
From which version are you migrating from @anirudhagarwal1 |
I am upgrading from 0.63.4. Also one more question. The above screenshot is of a release build, then why do I see some debug .so files(for ex: libhermes-executor-common-debug.so)? Is that expected? |
This is also what we experienced upgrading from 0.63.4 to 0.66.3 too - about 6MB of new libs (including hermes/debug ones in non-Hermes release builds). |
Nope is not. The Lines 360 to 379 in a03bd2f
The best would be to try on an empty project on RN 0.66.0 and verify if it's working correctly or not. |
Yep, doesn't look like it's working:
|
@cortinico Do you need anything else from my end to help you debug the issue? |
Nope, thanks for the input 👍. I was able to reproduce, and the bug is effectively there on From @liamjones command, running on 0.67:
The fix is most likely this #32257 which haven't been included in 0.66.0. Given that 0.67 is really close to be released, I think we should be good to go with that. Should there be blockers for 0.67.0, we can consider backporting #32257 to a point release for 0.66.x Closing as this was essentially resolved. Feel free to re-open or comment if needed 👍 EDIT: typo |
This issue not resolved in 0.67 also, im seeing same bundle size with newer version also. |
after upgrading from 0.66 to 0.67 it went down for 30MB, but there is still a 40MB up compared to previous version. But I did have android minsdk bumped from 21 to 23, as others suggested, it also contributes to the increases of size |
I bumped my minSdkVersion to 23 from 21 and apk size doubled but i found a workaround-ish on stackoverflow linked below here |
Description
APK Size got increased almost double after upgrading to React Native 0.66.0
OLD APK Size: 18Mb
NEW APK Size: 41Mb
Version
0.66.0
Output of
react-native info
info Fetching system and libraries information...
System:
OS: macOS 10.15.6
CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
Memory: 33.75 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.15.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 7.16.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK: Not Found
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29, 30
Build Tools: 23.0.1, 25.0.3, 26.0.1, 28.0.2, 28.0.3, 29.0.2, 29.0.3, 30.0.2
System Images: android-26 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.6953283
Xcode: /undefined - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_201 - /usr/bin/javac
Python: 3.8.5 - /Users/nj/opt/anaconda3/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.0 => 0.66.0
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Upgrade to react native latest version
Build APK.
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: