简体   繁体   中英

java.lang.UnsatisfiedLinkError error in android

I am making an app for QR code scanner. Got a sample from google where everyone commented it works. I am getting the following error

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/app.iihr-2/base.apk"],nativeLibraryDirectories=[/data/app/app.iihr-2/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libiconv.so"

I am getting the error in this line

  static {
    System.loadLibrary("iconv");
  }

the libiconv.so file is present in \\libs\\armeabi-v7a

as well as in

libs\\armeabi

Can anyone help me?

I fixed the error by adding more folders in jniLibs.

I added in the following fashion

Image

Then I put my .so files in all of them. Still error was coming, so I changed my target sdk from 23 to 22 and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM