6

Whenever I try to open camera/gallery through intent, I am getting this error in my Honor 4C mobile, Android version 6.0 with 64-bit octa-core CPU.

load: so=/system/lib64/libhwuibp.so

dlopen failed: library "/system/lib64/libhwuibp.so" not found

Basically I am trying to crop an image with help of OpenCV-2.4.13.1-android-sdk so file. But this error seems to be device related as in other mobiles the app is working totally fine, could anyone help me in this?

Community
  • 1
  • 1
Chetan
  • 226
  • 3
  • 12
  • Add some relevant code may help determine what the issue is. Even if it is working on some phones there may be alternate code that can be used with better success on all devices. – Fencer04 Oct 03 '16 at 15:52
  • @Fencer04, below is the code to load the so files, i am using https://github.com/jhansireddy/AndroidScannerDemo library to crop the image. `static { System.loadLibrary("opencv_java"); System.loadLibrary("Scanner"); }` – Chetan Oct 05 '16 at 04:45
  • /system/lib64/libhwuibp.so check library in file system. Some device dont have folder lib64. Its popular error when opening library – Peter Oct 06 '17 at 11:15
  • Do you setup your libs folder or build path dependency correctly? Or check the libs to find if they already have 64bit or not – nhoxbypass Oct 08 '17 at 15:20

1 Answers1

3

Have you tried this solution?

Hi, I searched on the net these days and finally found the solution! If you are using Android studio, just edit the gradle.properties in the root folder and add android.useDeprecatedNdk=true. Then edit the build.gradle file in your app's folder, set abiFilters as below:

android {
    ....
    defaultConfig {
        ....
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
        }
    }
}

source: https://github.com/yixia/VitamioBundle/issues/305

pleft
  • 7,567
  • 2
  • 21
  • 45