Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zbar scanner not supported for Android 6.0

when i click the scan ,its throw error like , But previous versions till lollipop its working good .

java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/xxxxxxx-xxx/lib/arm/libiconv.so: has text relocations
    at java.lang.Runtime.loadLibrary(Runtime.java:372)
    at java.lang.System.loadLibrary(System.java:1076)
    at me.dm7.barcodescanner.zbar.ZBarScannerView.<clinit>(ZBarScannerView.java:33)
    at com.xxx.xxx.SimpleScannerActivity.onCreate(SimpleScannerActivity.java:101)
    at android.app.Activity.performCreate(Activity.java:6248)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1125)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2437)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2544)
    at android.app.ActivityThread.access$900(ActivityThread.java:150)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1394)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:168)
    at android.app.ActivityThread.main(ActivityThread.java:5845)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)

while executing the below code

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

My TargetSDK version is 23 . If i change into 22 its working fine

Please do the needful

like image 225
Abdul Basith Avatar asked Nov 25 '25 08:11

Abdul Basith


1 Answers

1、download the latest zbar project here

2、grab the latest .so from barcodescanner/zbar/src/main/jniLibs

this works for me

like image 56
Lim CHAN Avatar answered Nov 27 '25 00:11

Lim CHAN



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!