How to decrease the app size

2992
3
06-12-2014 06:22 PM
JosephDwyer
New Contributor II
I noticed that when I add the ArcGIS SDK to my app it almost tripled in size.  I mean even the simple HelloWorld app is like 40+mb in size.  So is there a way to cut some of the fat off the SDK that may just be taking up space.
0 Kudos
3 Replies
RaimondM_
New Contributor

I have same question. Size of installed app is very big after adding SDK. How could we shrink it?

0 Kudos
EricBader
Regular Contributor II

Good question. 

Android itself has recently introduced a lot of great tech that addresses app size and app thinning.

However, the ArcGIS Runtime API has a dependency on a very large native library that simply cannot be reduced. Your application code CAN take advantage of Android tools for shrinking, as this code is Java/Kotlin. But at the end of the day, it's the required native lib that cannot be reduced in size.

I hope this helps. I know it's not the answer many are hoping for. This is where we are today.

0 Kudos
MarkBaird
Esri Regular Contributor

I'm in the process of writing an article on this very subject which will be available on our website in the next few days.

One very quick win is to apply abi filters to your gradle build script.  Try adding the following to Module:app

buildTypes { release { ndk { abiFilters "armeabi-v7a" } } debug { } }

This will exclude the x86 binaries from your APK.

You could go from this (43Mb)

To this (24Mb)

0 Kudos