Manage TFlite and MediaPipe for different ABIs
I am creating an android app using TensorFlow and MediaPipe for Object Detection. But in some devices, I am getting ABIs crashes for some devices in the firebase and this problem I am facing after the release the app. Could you pls help to resolve this issue? Thanks in advance.
TFLite and Mediapipe APIs are compiled for four ABI platforms, armeabi-v7a, arm64-v8a, x86 and x86-64 which cover most Android devices. Could you tell specifically, on which ABIs is the app crashing?
@shubham0204 I am getting crashes issues in the app production.
I am asking about is it necessary to use these abiFilters for supports 32-bit processor?
ndk { abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64' ,'x86' }
check this and also you can check the stackTrace as well at the bottom.
MLKit and TFLite docs do not suggest adding abiFilters to build.gradle, but there's no harm in adding them.
Without adding them, Android / PlayStore assumes that the app is built for all four ABIs. If this is not the case with the app, users may face crashes as the native code will not be supported on their device. Hence, it would be great to add abiFilters to give the right directions to the Android OS and PlayStore
I have added abiFilters but still getting error of not found native code. How to manage this?
And if user face crashes then how to handle it?
Can you share the entire log trace here (of the native-code not found error)?
Here is the screenshot of play Console log trace.
@shubham0204 did you checked this issue?
I am still not able to understand the cause of the issue The best we can try is to update the TensorFlow dependencies if they're not the latest ones
Whenever you figured out this issue Kindly let me know. In addition, I have used latest TensorFlow dependencies for my project.
@VishV-Android Which Mediapipe Task library are you using for object detection? Do let me know its version and artifact ID.