Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Huge apk size increase when using crosswalk browser

I have followed the instructions from here Creating an application with the embedding API and have integrated the cross walk library which works well and displays a remote website url successfully. But the .apk file size jumped to 61.8MB from 21.8MB . I have also enable proguard rules for crosswalk inside my application. Is there any way to reduce the size of apk?(at least to the Google Play 50MB limit)

like image 768
hariszaman Avatar asked Jul 10 '15 12:07

hariszaman


1 Answers

Crosswalk builds for 2 types of arch: x86 and armv7. Libraries for each of them has weight about 20M. So in sum you get ~40M.

There are 2 options to decrease final build size:

  1. build 2 separate apk for each arch and upload them to Google Play (it's supported)
  2. use Light version of Crosswalk

For the 1st option you can check my example on Github. Repository contains example of Crosswalk embedding and some build flavors to build as x86, armv7 or combined.

For the 2nd option you can check official information here.

Some data regarding sizes of Crosswalk version:

  • x86: 11.1M (vs. 20.8M on Crosswalk 10.39.232.0)
  • ARM: 9.63M (vs. 18M on Crosswalk 10.39.232.0)
like image 145
comrade Avatar answered Sep 30 '22 19:09

comrade