I am planning to develop an app for emerging market with low internet bandwidth. The app heavily requires an internet connection to function.
I need this app to have a small apk size (not more than 10mb) and work on 3G network.
Based on my research if I remove x86 JS binary files from React Native the apk size could be as small as 4mb. I suppose the 4mb does not include the JS files and images so client needs to download that first time when he/she opens the app, is that correct?
Would it in general be a good idea for me to use React Native if I want an app with less than 10mb apk size that works on 3G and what are the best practices to make it efficient?

- 1,216
- 3
- 13
- 25
2 Answers
Instead removing js which have very less impact you should go after binary resources such as font and embedded images. Apart from that these are following techniques that may work for you:
1) Enabling Proguard:
To enable Proguard, edit android/app/build.gradle:
def enableProguardInReleaseBuilds = true
Generate Separate Builds:
2) In your app/build.gradle set
def enableSeparateBuildPerCPUArchitecture = true
3) Remove x86 from abiFilters
Following are references to links that you may find useful:
Blog on decreasing size of apk:
https://realm.io/news/reducing-apk-size-native-libraries/
Link one of smallest RN app on play store:
https://github.com/sonnylazuardi/ziliun-react-native
Useful discussion on React Native Issue regarding apk size:

- 773
- 5
- 11
-
1I am kinda curious why JS files dont really affect the apk size. I added a 1mb js library. I doesnt seem to really increase the apk size. Why is that so? – abeikverdi Dec 17 '16 at 09:48
-
Were the parts of that JS file being executed in the program?? I think, if the file is not being executed,they are not included in final builds.(Thats my guess) – Chromonav Dec 21 '16 at 05:53
-
The js files are bundled in the app. Its a released signed apk. Those js files should exist somewhere.. – abeikverdi Dec 22 '16 at 16:20
-
@abeikverdi I figured it out now.. It is because of Webpack. If the lib is not being used it is not bundled with the source – Chromonav Jul 14 '17 at 03:59
If you just want the app with lower app size, Use native platform itself. Minimum size of the native android app will be 1 MB. You can't reduce the size of the react native app lesser than 4 MB.

- 7,658
- 4
- 40
- 60
-
right, 4mb works for me as long as its only 4mb. Is js file size included in that 4mb? – abeikverdi Jul 05 '16 at 03:00
-
-
What if the device gets the js from my server once client loads the app for the first time? does this reduce the apk size? – abeikverdi Jul 06 '16 at 02:29
-
This might reduce the app size. But, I don't know any way to do that. – Sriraman Jul 07 '16 at 06:32
-
Expo is doing it, But I am confused how you people have a build size of 4 MB, My min build size is 9 Mb. – Rajendran Nadar Dec 30 '21 at 23:12