Comments (9)
I just found an interesting blog post about that topic you might find interesting:
https://realm.io/news/reducing-apk-size-native-libraries/
We will tinker around with different apk files per architecture (also linked in the original article):
https://developer.android.com/studio/build/configure-apk-splits.html
I will keep you up to date about the progress on this our side!
from liquidcore.
Yeah, I referenced that article in AndroidJSCore.
There is not much I can do with libnode.so
. It is what it is. I stripped everything out of it that had any bulk (especially ICU which is a pig). However, I have to say that I am surprised that libliquidcore.so
is the same size. It should be nowhere near that big. I may have unintentionally left all the symbols in it. I'll take a look at it. That should reduce the size dramatically.
As you rightly note, if you are really concerned about APK size, you will need to do an APK split. I had considered publishing separate libraries for each arch, plus one big multi-arch one for those who aren't concerned about size, but I never really got around to it.
from liquidcore.
No Worry the size of ibliquidcore.so is only the smallest one here (1.2 MB compared to lobnode.so 17.7 mb).
We are currently using libliquidcore via gradle.
To split the apk's i will have to include the library as described in
"Building the LiquidCore Android library"?
And thank you for referencing me to the article in the deprecated project i seem to missed this!
from liquidcore.
Maybe. I haven't actually tried it. It may be possible to do the APK split from the app itself. Android Studio may be smart enough to ignore anything not related to the ABI.
from liquidcore.
Ok we will check it out and keep you up to date! thank you!
from liquidcore.
Just came across this when working with React Native: https://developer.android.com/studio/build/configure-apk-splits.html
This is a step-by-step how-to from Google.
from liquidcore.
Update on this: Version 0.3.0 reduces the size of the library by half by removing explicit support for 64-bit architectures (they can use the 32-bit versions without issue), and stripping out the debugging symbols. So the current aar is ~15MB. My goal is to get it under 10MB. I think there several other opportunities for reduction.
from liquidcore.
I was able to squeeze out another ~1.5MB by re-using the built-in Android SQLite implementation, rather than compiling sqlite3.c into the project. The footprint (not rolled into a release yet) is now at 13.3MB. Running out of opportunities for reduction, though.
from liquidcore.
This is resolved in the new release, 0.4.0. To reduce further, be sure to enable ABI splits in your build.gradle
.
from liquidcore.
Related Issues (20)
- Use jsexport methods in microservice js file
- How to build liquidcore-xxx-x.x.x.aar files? HOT 2
- use of undeclared identifier 'ftello'; did you mean 'ftell'?
- ArrayIndexOutOfBoundsException calling into javascript function
- Integrate with Android Studio via implementation
- Is there some way to choose which version of Node is used? HOT 1
- PLEASE correct your github package information HOT 2
- Cannot import liquidcore in java code HOT 1
- Fix like this please! Pass null value from JS to native causes an exception
- Can't figure out how to install modules please help HOT 1
- java.util.Set com.google.gson.JsonObject.keySet()
- How to better debug JS code in flutter environment
- String length limitations?
- Serious memory leak (Android liquidcore) HOT 4
- Android - zsh: parse error near `\n
- xcode build failed (iOS) HOT 4
- How can I get the running log? HOT 2
- Xcode build failed at LiquidCore-headers
- Running Angular / NodeJS app as standalone on macOS, iOS and Android
- BUILD FAILED in 16s
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liquidcore.