React Native for small size apk with low internet bandwidth

前端 未结 2 759
长情又很酷
长情又很酷 2021-02-08 01:05

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 sm

相关标签:
2条回答
  • 2021-02-08 02:05

    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:

    https://github.com/facebook/react-native/issues/5037

    0 讨论(0)
  • 2021-02-08 02:07

    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.

    0 讨论(0)
提交回复
热议问题