I tried two ways to compose a standalone Android app from CRNA project:
Use the Expo "exp build" command (this guide)
Eject and build an APK manually (this guide)
Both ways work well and yield the working APKs, but the first one is of 26MB size while the second one is only 7MB!
Why "exp build" generates so large APK?
I've found an answer:
If you need to keep your app size extremely lean, Expo may not be the best choice. The size for an Expo app on iOS is approximately 25mb, and Android is about 20mb. This is because Expo includes a bunch of APIs regardless of whether or not you are using them — this lets you push over the air updates to use new APIs, but comes at the cost of binary size. We will make this customizable in the future, so you can trim down the size of your binaries.
Source is here
Related
I'm a young flutter developer and I would like to understand, why we use this command
flutter config --no-enable-web --no-enable-macos-desktop --no-enable-windows-desktop --no-enable-linux-desktop
while we can create the binary file by writing the command :
"build platform-name"?
moreover, if flutter was designed for cross-platform applications starting from a single code, why do these engineers always allow us to use this command?
and from what I've read, the command can only be useful if, flutter doctor finds problems or missing components for a platform you don't want to develop for. but, I also say to myself, that I can use this command, in this following:
-- if I only want to develop an application for mobile (android and ios), then I don't need other platforms and vice versa so that it can lighten the files.
unless, when we decide to build according to any platform, the build system manages to recognize the if....conditions that we place at certain levels of the codes in order to specify the nature of the platform for insert, the design that suits it, and according to the user experience when we develop for all platforms. from the same project.
because me, I think that, if the developer, finished developing his project on a platform such as (android and ios) and later thinks of developing this same application for the other remaining platforms, he can create a project of the same name and given that his backend (if of course his project has any architecture) of his first project is cross-platform he can simply copy and paste this backend, then focus on developing the frontend side according to the platforms (Windows, Linux, macos and web) always according to the perspectives of his project.
Hence the weight of the files will be controlled, in order to make the build according to the fluid platform.
Basically that's what I think, so , tell me more about this command in order to use it better and to be able to manage my architectures according to the platforms. thank you
Are there any limitations for using React and/or Flutter for both Android Instant App and Apple App Clips?
I could not find any info, except for size limitation (15/10 MB respectively).
Also, if it is possible, can I use a single code base?
Thanks!
Flutter APK size is too big to support Android Instant Apps. App Clips are experimental (more in docs).
I have developed a simple app(with 3 navigation tabs, some components, no images, using native-base) react-native app using expo-cli.
then I build the app using turtle on online and then app size is 44.6MB.
I think my app size 10MB at maximum. but it is 44.6MB.
I check the build progress and there are so many unwanted modules added.
I want to make my app as small as possible while using 'expo'.
you can build app bundle with expo build:android -t app-bundle and then generate apk for specific platforms with https://developer.android.com/studio/command-line/bundletool
I think #Andrew's suggestion is right.
I have reduced the APK size using react-native-cli.
I am new to Flutter and dart language. After developing some example apps seeing from the tutorial I have come to know that the simple Tab-Layout App is taking 7MB for APK after release and after installing the APP the size is 27MB. My question is as follows:
What is the difference between the APK Size and Installed APP Size?
When developing an App whether its Native or Flutter, what should we keep in mind that APK size should not be huge or the size of the APP after installing should not be huge?
Keeping in mind of the all pros and cons of Native and Flutter, what is the best approach to develop an Android APP?
Installed App has something like the DOUBLE in space of the standard APK, this is cause by how Android "installs" all Apps. If you open a folder in "/data/app/..." you can see that for each PackageName/App it is stored the standard APK file (the one you release) and there are at least two folders: for libraries and one for optimized code (not accessible/readable from us without Root). These folders contain other extracted and optimized files starting from your APK.
Flutter Apps cannot be smaller than 6-7Mb because it brings all Flutter Core inside them. To "shrink" your App you can follow common rules to shrink any normal Native App.
The best approach? All depends on your skill, how much available time you have to complete the App, how much times the Customer change his minds about the position of some graphic interface, etc... Flutter main website page has written "Flutter is Google’s mobile app SDK for crafting high-quality native interfaces" so the main purpose of it is to quickly create Interfaces. This is good when a Customer interrupts our work every 10 minutes because he wants to change something in the graphic aspect and we cannot manually change many XML and then rebuild a version each time, so Flutter could improve this step a lot. Flutter is even good at initial stage when we are not sure where we will set components/widgets at final stage, so we can move all the stuff in few seconds to check the graphical result. Performance of Flutter Apps are quite good, but not good as a Native App obrliviously. Using Flutter could be the good way when you already know that the final APK will be bigger than 25MB, because in this case 25MB or 25+7MB is not that's difference but the speed (in GUI development) provided from Flutter are something not estimable.
I'm developing a hybrid app using worklight, and so far I just have couple of screens in my app. But when I run this app in my Android phone, if I check the apk file it's size is showing as 4.4 MB! I'm not even 20% through my app development and still it is so heavy.
Is this an issue with worklight or there is a way in worklight to keep your app lightweight?
Thanks for the heads-up. We are aware of this and are making way on reducing our application file size in a future release.
I'm not in front of my work machine at the moment, so I can't test tips before giving you them, buuuttt... in your native\assets folder there should be a icudt46l.zip file.
If you do not intend on using the JSONStore feature, try deleting this file and re-building your app. This should reduce the filesize considerably, but again I can't guarantee what happens during runtime (nothing bad should happen...).