-
Notifications
You must be signed in to change notification settings - Fork 174
Reduce APK File Size
Brianvdb edited this page Dec 23, 2017
·
3 revisions
There are a few ways to reduce your APK file size.
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"
}
}
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"
}
}
You can also exclude the ARM or x86 architectures and build multiple APK's.
Excluding ARM
android {
...
aaptOptions {
ignoreAssetsPattern "!arm"
}
}
Excluding x86
android {
...
aaptOptions {
ignoreAssetsPattern "!x86"
}
}