I'm developing an app for my company and we are facing a problem. We have imported a library (no ours, we bought it) and it didn't work without setting the abiFilters
to
ndk {
abiFilters "armeabi", "x86"
}
that made the library works but Salesforce SDK is bugged/not working with this filter. The library that we bought is an .aar
, we unzipped it and found that libraries for armeabiv7
and x86_64
is not there.
There is any way to force the .so
or whatever to search for armeabi
and x86
library JUST for that module without setting filter for the entire application?
Thank you in advance.
There is any way to force the SO or whatever to search for armeabi and x86 library JUST for that module without setting filter for the entire application?
Answer is NO.
Because, on 64-bit devices, if you have provided both 32-bit and 64-bit .so
, the system will pick the 64-bit version for all the .so
libraries. If some a library does not have the corresponding 64-bit library, your app will throw error java.lang.UnsatisfiedLinkError: Library xxx not found
, this is because the system needs a consistent AND non-mixed native instruction sets, i.e. either pure 64-bit instructions or pure 32-bit instructions. You CANNOT expect that the Android system picks up 64-bit .so
for some libraries but at the same expect it picks up 32-bit .so
for other shared libraries.
For your case, the abiFilters
actually forces all your .so
files to only have 32-bit version .so
for your final apk, so that your app can work like you said.