twilio / twilio-chat-demo-android

Chat API Demo Application for Android
MIT License
62 stars 51 forks source link

APK size increases to 1.4 GB after integrating Programmable Chat #160

Closed sushant-bizbrolly closed 3 years ago

sushant-bizbrolly commented 3 years ago

Description

After adding implementation of Twilio Programmable Chat in my build.gradle file, the generated debug APK size increased to 1.4 GB. I introspected APK, and found the lib folder contains 4 folders with Twilio files in it. It all together took 1.4 GB. Pleasehelp me out with this issue and how to resolve this.

Steps to Reproduce

  1. Add Twilio Programmable Chat implementation in build.gradle
  2. Rebuild the project
  3. Generate debug APK
  4. And the size would be in GBs

Code (optional)

implementation 'com.twilio:chat-android-with-symbols:6.1.1'

Chat Android SDK

Which SDK version did you use? [eg. 2.0.8] 6.1.1

Screenshots attached. Screenshot from 2021-02-26 00-14-34 Screenshot from 2021-02-26 00-16-12 Screenshot from 2021-02-26 00-17-17 Screenshot from 2021-02-26 00-19-04 Screenshot from 2021-02-26 00-19-53 Screenshot from 2021-02-26 00-21-26 Screenshot from 2021-02-26 00-21-52 Screenshot from 2021-02-26 00-22-11 Screenshot from 2021-02-26 00-22-55

berkus commented 3 years ago

Do you have NDK installed? if you use implementation 'com.twilio:chat-android-with-symbols:6.1.1' then you need NDK installed to strip out the debug symbols after the build.

Try with implementation 'com.twilio:chat-android:6.1.1' instead first (this will not give you debug info, but the APK should definitely be smaller), then install NDK if you actually require debug symbols.

sushant-bizbrolly commented 3 years ago

Ok thanks, I will try out this solution of yours and let you know if any issues faced further.

berkus commented 3 years ago

@sushant-bizbrolly hi, did you make it work? need any more help?

sushant-bizbrolly commented 3 years ago

@berkus yeah, it worked. thanks. I am using the without symbols integration, and the APK size is around 35MB. Thanks for the help.

berkus commented 3 years ago

Glad to hear it! Cheers!