How to reduce the apk size of Android app which need openCv lib( only for Image processing)
I have tried through several answers like apk split , Flavors Build but it does not works for me.
I'm building an Android app with min sdk 15
, which uses opencv library.The problem is when I build apk size of it is more then 60
MB which is not very great.
I checked the app file, I could see that the size is too big due to libopencv_java3.so file in all architectures like amr64, armeabi, mips, x86 etc.
I am using openCv only for image processing.This library has a lot of other features like video processing, 3d image, object detection and much more, which I don't need in my app like
If I remove all those files and build APK, then size will be reduced 50 mb , but to make this app work I need to install OpenCVManager
to run my app.
Is there any way by which I can reduce my apk size?
Or is it possible just to extract only the feature from openCv
which I am intersted in and create .so
for those features?
i'm no more using android, but you'd have to build your own sdk with a reduced opencv_java.so, and use static initialization (init_Debug() or what it was called), and NOT using the opencv manager, right ?
meaning: you'd have to interfere with cmake and choose a limited set of modules (not all there is), when building opencv_java.so.