Couch lite for Android increases apk file size by 5MB

After migrating from TouchDB to Couchbase lite android, i find the apk size increases by more than 5mb considering my only requirement with using couchdb is to store objects locally.
Is this expected behavior or am missing something like excluding some unwanted modules.
Please advice.

What platforms are you building for? If you have, say, both x86 and ARM, Android may be packaging up different native binaries. It will only install the ones appropriate to the platform, though. To make sure this is working correctly you might want to try it on an emulator and verify exactly how much space is being taken up.


The Android TouchDB was never really completed, so it was probably missing a lot of functionality.

I don’t work on the Android codebase but I know we’ve needed to copy 3rd party libraries into it, at least in some configurations. That includes both SQLite and ICU. (For example, starting in Android N apps aren’t allowed to link with the built-in native libraries anymore.)

@hideki, any other ideas?

CBL Android used to be smaller which was 1.0.x. Because of native libraries, current version’s size is pretty big.

Two ides to reduce the library size

  • Compile CBL Android from source code with disabling ICU4C. It also requires manually removing ICU4C dictionary. I assume this could save few mega bytes.
  • Remove native libraries of unsupported architectures. This might save another few mega bytes.