This question and this post mention that the NDK builds with armeabi-v7a
ABI filters would work for aarch64
Android platforms as well, so we don't need to include arm64-v8a
in the ABI filters list.
However, I faced the following problem on two aarch64
platforms, a Lenovo Phab-P1770M and a Redmi 3S.
I am using opencv library in my project. However, when I add the following to my app.module
ndk {
abiFilters "armeabi-v7a", "x86"
}
I see that the built apk does not include libopencv_java3.so
in the lib/armeabi-v7a
and lib/x86
folders. Calling opencv
functions, obviously crashes as well with the error, libopencv_java3.so
.
However, when I add arm64-v8a
to the list above, lib/arm64-v8a
folder is additionally created in the APK as well ( as expected). But the libopencv_java3.so
library is present only in that directory and as expected, the module gets loaded properly on runtime.
So basically, I want to understand whether just using the ABI filter armeabi-v7a
work for aarch64
platform as well or not. Because the aforementioned two posts say that it should, but my experience does not show that.
Can anyone help me understand what am I doing wrong?