Skip to content

Commit 8eddac9

Browse files
committed
Add APK size FAQ
1 parent 468bd24 commit 8eddac9

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,27 @@ Also, please let us know your feedback by opening an issue:
129129
for example, if you experience errors or if you have ideas for how to improve the API.
130130
Thanks!
131131

132+
FAQ
133+
---
134+
**Q:** After adding ObjectBox, the size of the APK increased significantly. Why is that?<br>
135+
**A:** Flutter compresses its native libraries (.so files) by default in the APK.
136+
ObjectBox instructs the Android build to use uncompressed native libraries instead
137+
(following the [official Android recommendations](https://developer.android.com/topic/performance/reduce-apk-size#extract-false)).
138+
This setting affects the Flutter native libraries as well. Thus the now uncompressed Flutter libraries add to the APK size as well;
139+
we've seen an additional 19 MB for the standard Flutter libraries.
140+
_This is bad, right?_ Nope, actually uncompressed libraries use **less** storage space on device and have other advantages.
141+
For details, please review the [official Android recommendations](https://developer.android.com/topic/performance/reduce-apk-size#extract-false)
142+
and the [ObjectBox FAQ entry](https://docs.objectbox.io/faq#how-much-does-objectbox-add-to-my-apk-size) on this.
143+
Both links also explain how to force compression using `android:extractNativeLibs="true"`.
144+
132145
See also
133146
---------
134147
* [Changelog](CHANGELOG.md)
135148
* [Contribution guidelines](CONTRIBUTING.md)
136149

137150
License
138151
-------
139-
Copyright 2019 ObjectBox Ltd. All rights reserved.
152+
Copyright 2020 ObjectBox Ltd. All rights reserved.
140153

141154
Licensed under the Apache License, Version 2.0 (the "License");
142155
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)