forcedotcom / SalesforceMobileSDK-Android

Android SDK for Salesforce

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected increase in APK size when including SalesForce SDK

samupr opened this issue · comments

Please fill out the following details:

  1. Version of Mobile SDK Used: 10.1.1
  2. Issue found in Native App or Hybrid App: Native Android
  3. OS Version: Android 12
  4. Device: Samsung Galaxy S20
  5. Steps to reproduce: Add SalesForce Android SDK and build full solution
  6. Actual behavior: Size of App increases by approximately 18Mb
  7. Expected Behavior: Minimal increase in size
  8. Error Log: n/a

We have noticed that adding the SDK increases the size of our APK by approximately 18Mb. After investigation, we can see that this is caused by libsqlcipher being 14.3Mb due to multiple versions being included in the build. We can see the gradle reference has been added for this library, so we are unsure why files are actually included. We are unable to view the actual sources where it's been added.

Potential Solution:
Remove the files and keep just the gradle reference to libsqlcipher and all should still work properly without causing the big file increase.

image

This is not a Mobile SDK issue but a SQLCipher issue. It has been reported in the context of other apps using SQLCipher (e.g. here). Maybe you can post your issue on SQLCipher's github?