Skip to content

Reduce APK File Size

Brianvdb edited this page Dec 13, 2017 · 3 revisions

There are a few ways to reduce your APK file size.

Exclude FFprobe

If you do not use FFprobe in your project it is recommended that you remove the FFprobe library files from your APK build. To do this, add the following packagingOptions block in your app module Gradle.

android {
    ...
    aaptOptions {
        ignoreAssetsPattern "!*ffprobe"
    }
}

Exclude FFmpeg

Similarly, you should exclude FFmpeg library files if you only use FFprobe in your project. To do this, add the following packagingOptions block in your app module Gradle.

android {
    ...
    aaptOptions {
        ignoreAssetsPattern "!*ffmpeg"
    }
}
Clone this wiki locally