Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reduce the size of an expo/react-native app on Android

I am developing a small dictionary app by using react native with expo.

As I am compiling to Apk file. The size goes up to 30mb and after having installed on a device, it goes to 80mb.

Is this normal?

Are there any ways to reduce the size of the app?

Thank you guys.

like image 703
Sras Avatar asked Apr 24 '18 03:04

Sras


People also ask

Is Expo Better than React Native?

Expo expands the API surface of React Native React Native does not give you all the JavaScript APIs you need out of the box, but only most primitive features. React Native developers are expected to use Android Studio or Xcode to link additional native libraries.

Is Expo good for React Native?

Here are some good reasons to use Expo to build your React Native app. If you are given a project that needs rapid development, and you have picked React Native to build the cross-platform app, Expo is the best fit for you. With Expo, you can build and deploy React Native apps for both iOS and Android with ease.


1 Answers

For android APK bundle using expo, you can use the following command:

expo build:android -t app-bundle 

The size will be much smaller once you upload it to the play store. This is relevant for React Native SDK 32 and earlier.

like image 99
jakobinn Avatar answered Sep 17 '22 12:09

jakobinn