Search code examples
androidandroid-gradle-pluginlibvlc

Android: VLC-android-sdk increase 60MB to my apk file size


My apk file size is 5MB

After adding the "de.mrmaffen:vlc-android-sdk:2.0.6" to gradle, apk size increase to 62MB.

How can I resolve it?

Note: I changed it to this, But it didn't work.

compile ("de.mrmaffen:vlc-android-sdk:2.0.6"){
   exclude group: 'io.card'
}

Solution

  • VLC uses lots of native code. As a result, it has 18-30MB of native libraries per CPU architecture. While that will be compressed somewhat in the APK, a 57MB increase in APK is actually better than I would expect.

    You either need to:

    • Live with it, or

    • Use splits or product flavors to indicate which subset of CPU architectures you are willing to support (the library itself supports arm64-v8a, armeabi-v7a, mips, x86, and x86_64), or

    • Do not use VLC