-
-
Notifications
You must be signed in to change notification settings - Fork 55.6k
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
Android 6.0: Load 32-bit OpenCV library on 64-bit arch #5862
Comments
Please provide more details. Did you try this code for OpenCV loading? |
Pardon me I am using OpenCV for Android
I want to use another library that is only 32 bit. Android 6 searches the abi for 64-bit libraries first and if the device finds a 64-bit library, it loads that library and cannot also load 32-bit libraries. Android 6 can load 32-bit libraries so long as that is all the device loads. They cannot mix. What I am asking is if a feature could be implemented to allow developers the explicit statement of what bit format OpenCV loads. It automatically detects and searches for 64-bit when both formats are possible but if it is desired to omit 64 bit libraries, I should be able to specify to OpenCVLoader's Abi to only load from armeabi or armeabi-v7a. Thank you again and hopefully that will clarify what I am asking, Koala |
Thanks! Problem is more clear now. Did you try to remove/ignore "invalid" 64-bit library folders from native/libs (OpenCV for Android)? Does it work? |
Thank you for the quick reply, So far I have just tried removing them but it results in the following error: so having removed them is detecting that a 32-bit version should be loaded but the loader is looking in a folder that I haven't even got included |
the folders I have included from the native -> libs are: I have also tried cleaning and rerunning my application |
|
Well although this is progress, it is for some reason not searching for libopencv_java3.so but instead libopencv_java.so and throwing a different unsatisfiedlinkerror |
There we go |
It is already fixed in OpenCV 3.1.0: 83b2621 |
:/ must have missed it by a couple days... I'll update to the new version Pardon the waste of time |
Everything is compiling correctly and updating to the new version just made it so I wasn't manually altering the files! To you I say Kudos and thank you. This issue is resolved. |
Thanks for update. There are no plans to add this feature into OpenCV Manager (because problem is very specific and can be resolved in other way). |
Thanks. @alalek |
Hello,
So I was trying to use:
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_0_0, this, mLoaderCallback);
and only include 32-bit libraries in my local jniLibs folder in hopes that my application would recognize that it is supposed to load on a 32-bit platform instead of a 64-bit platform. After a couple days of research I had the best fitting solution to only include 32-bit libraries but OpenCVLoader still tried to load a 64-bit framework and instead of gettings the error that this is a 32-bit library in a 64-bit application, I was getting the opposite figurehead.
I guess my issue/requested fix would be to allow the user to explicitly state whether they want to load a 64-bit platform or a 32-bit platform or to detect local jni files to load as necessary through OpenCVLoader's code.
Thank you for your time and consideration,
Koala
The text was updated successfully, but these errors were encountered: