React Native Frameowrk Size in Android Builds

Amit Gupta
1 min readAug 9, 2023

--

Goal:

Evaluate the Size of React Native(RN) Framework for Mobile Apps.

Investigation:

Create Sample React Native app and Sample Android Native App to compare the size of final apk. Repos for Sample Apps are:

React Native: https://github.com/g5-amit/AwesomeProject

Android Native: https://github.com/g5-amit/Android_Blank_Sample_App

Build Optimization:

Both Sample app’s apks are optimized for the followings factors:

1.) Shrink Resources rules are applied

2.) Same Proguard rules applied for obfuscation

3.) ABI Architecture rules are applied

4.) Resolution Density rules are applied

5.) Used Android 33 as Android target OS.

Method to find RN framework size:

Since RN app also includes the Android Sample Apk size while creating the apk.RN Size is calculated with formula:

RN Framework Size in final Apk = RN Apk Size- Android Native Apk Size

Result for RN App: (6.3MB — 7.5MB)

RN Apk Size for different ABIs

Results for Android App (2MB — 2.1MB)

Android Apk Size for different ABIs

Results:

Final Size taken by RN framework = 4.3–5.4MB

Thanks for reading the content.

--

--