mrmaffen / vlc-android-sdk

VLC Android SDK pushed to Maven Central. Primarily used in project tomahawk-android.
792 stars 244 forks source link

apk gets 60MB in size with vlc lib #53

Closed dinhka closed 7 years ago

dinhka commented 7 years ago

Hi, I use compile 'de.mrmaffen:vlc-android-sdk:3.0.0' then my app has 30MB in size, When i update to compile 'de.mrmaffen:vlc-android-sdk:1.9.8', the app get 60MB in size. big size it not good to upload to Google Play. Please help.

filipproch commented 7 years ago

@dinhka You should setup build configuration so that you have different APKs for each build type (armv7, x86_64, arm64, ...) and upload all of them to Play Store to your single app. This way you are packing all native libraries for all platforms with your apk which is useless.

Saren-Arterius commented 7 years ago

In app level build.gradle

android {
    productFlavors {
        prod {
            ndk {
                abiFilter "armeabi-v7a"
            }
        }
    }
}
shinayser commented 7 years ago

Hey @Saren-Arterius,

is only "armeabi-v7a" enough for a production app ou should we add some more?

Saren-Arterius commented 7 years ago

@shinayser It depends. I am sure most (> 98%) android devices are compatible with "armeabi-v7a". The 64bit android devices could fallback using armeabi-v7a. armv6 devices are simply being too old. MIPS devices are really rare.

The problem is x86 devices. It will be good to include x86 and x86-64 libraries.