Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is expo apk file very large even with just one screen code?

My expo apk file has a size of 45.8 MB.

Look at the apk size in the screenshot below.

  • App Info on Device
  • Expo apk size Vs android studio apk

How can I get a smaller APK-Size?

like image 977
whocoded Avatar asked Oct 27 '25 03:10

whocoded


1 Answers

There are many way's to reduce the size of your distributed app. I'm afraid you have to read & learn something about this, because this isn't a short & easy answer - at least, because there are many hooks where you can adjust your deployment-process to optimize your app(size).

But here some first suggestions:

  1. If possible use React Native CLI to initialize your Project (instead of EXPO)
  2. Don't use an existing React-Native Module for each stuff you do. Sometimes it gives you a lower footprint to code easy stuff by your own instead to import an npm-module from third-party
  3. Keep your files (audio, video, images) bundled with your app as low as possible, think about to use SVG where possible.
  4. Better use "app-bundle" for Android-Apps as general "apk-releases" (keyword: gradlew bundleRelease vs gradlew assembleRelease)
  5. Don't miss to read the Performance Section in React-Native Docs
  6. build.gradle gives you additional Options to optimize your App for bundling-Process. Be sure that you use Proguard with shrinkRessources to minimize your apk / bundle (keywords: Proguard, seperateBuildPerCPUArchitecture)

PS: Best result you can gain, with lowest effort to spend (only for Android-Apps): Switch from APK to Bundle (AAP) see Docs

like image 140
suther Avatar answered Oct 28 '25 17:10

suther



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!