-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [firebase_ml_vision] The latest firebase_ml_vision is increasing the app size by a lot #4767
Comments
Hi @inceptusp |
@markusaksli-nc yes, I am certain that the increase in size is from the included ML libraries... You can see by the screenshot I've attached on the first post. If you sum up all these sizes it will be ~21MB...
|
Could you provide your |
@markusaksli-nc I don't know how this would help, but here it is...
|
facing same issue. The plugin's build.gradle includes all the ML libraries which is increasing the app size to more than twice the original size of the app. |
@markusaksli-nc my pub deps output is as follows :
Flutter Doctor
|
Me too :/ |
Faced the same issue. Is there any solution? |
Can it be because 024a11c ? |
Sure seems like some app build.gradle stuff was unnecessarily copied into the main build.gradle... |
A workaround for now could be to exclude the .so files you don't need in your app's build.gradle, so they won't be included in the build:
|
As a workaround I manually delete those lines from the ml_vision Gradle file:
Like this we're back to normal size APK, PR could easily be done but not sure it will be accepted let me know |
Hey all, 👋, the I'd recommend switching to the alternatives now;
Apologies for any inconvenience here and best of luck switching over the the new APIs. Thanks |
Are you kidding me?? After 5 month the only solution you officially give is to migrate to a new package... And cherry on the cake that package is not even compatible with iOS and not part of FlutterFire... What a replacement...
Miracle will be more useful than luck in this case. |
@jaumard add to that that the mentioned package is not even Google officials and is not a proper replacement as it hasn't support for the camera stream... Which is different from the admob case where there IS an official replacement and with great support... |
Don't shoot the messenger 🙈 we on FlutterFire wrap the iOS and Android SDKs and vision has gone from the Firebase SDKs; Android: ...and the new standalone on-device sdk is nothing to do with Firebase anymore. To expand, you can replicate most of the Cloud vision APIs now via the easy to deploy Firebase Extensions, e.g. translate text, image labelling, sentiment analysis, text extraction, perspective toxicity analysis - and others in progress.
As for on device APIs - there is no official Flutter package that I'm aware of. Any work we've been doing on packages outside of Core, Auth, Crashlytics, Functions, Firestore, Storage and Messaging has been in our (@invertase) own personal time - there's only so much of this we can do and spending a lot of time writing a brand new plugin when we do a lot already elsewhere is not something we have the time for right now - hence the community plugin being suggested. I was considering sending PRs to google_ml_kit to add iOS support over the weekend if my personal time permits. |
I know firebase ml vision is now gone... and I'm not asking you or anyone to work on your free time to an equivalent if you don't want too :) My message is not agains you, I'm blaming the poor communication and management on this... It has been 5 month we're waiting a fix for this so it was already a blocker (at least for me I can't talk for the others ^^) so instead of discontinued the package out of the blue it would have been nice to have a fix and then discontinued it so people have time. Here we were already blocked are now even more blocked because there is no real alternative. I wanted to migrate my app to null safety and do a new release of my app. I'll probably get delayed by weeks (maybe month I don't really know) because of that. Another good approach would have been to contact google about this (maybe it has been done I don't know) saying ok you discontinued this but there is no equivalent so maybe you can jump on this and provide something. I don't know but I'm sure things could have been more smooth than just => |
same problem occurs while using google_ml_kit package.. |
Bug report
The latest firebase_ml_vision plugin is including a lot of dependencies that I don't use on my app and this is increasing the app size by ~21 MB
Expected behavior
I haven't worked on this app for a while, so I skipped some versions of the plugin, I upgraded straight from 0.9.6+2 to 0.10.0 but the last time I compiled the app, it was ~12MB and now it's ~38MB. It's okay that you are trying to simplify the use of Firebase plugins, but I think that this plugin, specifically, should continue with manual configuration of the dependencies so that the developer only includes what he will really use.
These libraries were not included in the APK before, for instance:
I don't use any kind of face detection, for example, or image labeling hence these libraries shouldn't even be in the app.
The text was updated successfully, but these errors were encountered: