Open chenzhikaizg opened 1 year ago
apks install oppo phone
Hi, what ML Kit barcode library are you using, and what version? Did you config anything like https://developers.google.com/ml-kit/tips/reduce-app-size#advanced_exclude_unused_ml_kit_binaries in your app?
Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: library "libbarhopper_v3.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
at java.lang.Runtime.loadLibrary0(Runtime.java:998)
at java.lang.System.loadLibrary(System.java:1661)
at com.google.android.libraries.barhopper.BarhopperV3.<init>(com.google.mlkit:barcode-scanning@@17.0.2:1)
at com.google.mlkit.vision.barcode.bundled.internal.zza.zzc(zza.java:1)
at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzbk.zza(com.google.mlkit:barcode-scanning@@17.0.2:8)
at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzb.onTransact(com.google.mlkit:barcode-scanning@@17.0.2:3)
at android.os.Binder.transact(Binder.java:1067)
at com.google.android.gms.internal.mlkit_vision_barcode.zza.zzc(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.0.0:2)
at com.google.android.gms.internal.mlkit_vision_barcode.zzox.zze(zzox.java:2)
at com.google.mlkit.vision.barcode.internal.zzl.zza(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.0.0:3)
at com.google.mlkit.vision.barcode.internal.zzi.zzc(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.0.0:3)
at com.google.mlkit.vision.barcode.internal.zzi.run(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.0.0:1)
at com.google.mlkit.vision.common.internal.MobileVisionBase.zza(MobileVisionBase.java:2)
at com.google.mlkit.vision.common.internal.zzd.call(com.google.mlkit:vision-common@@17.1.0:60)
at com.google.mlkit.common.sdkinternal.ModelResource.zza(ModelResource.java:8)
at com.google.mlkit.common.sdkinternal.zzl.run(com.google.mlkit:common@@18.1.0:49)
at com.google.mlkit.common.sdkinternal.zzp.run(zzp.java:2)
at com.google.android.gms.common.api.internal.zacr.run$bridge(com.google.android.gms:play-services-base@@18.1.0:266)
at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze(MlKitThreadPool.java:4)
at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc(MlKitThreadPool.java:1)
at com.google.mlkit.common.sdkinternal.zzi.run(zzi.java:32)
at com.google.android.gms.common.util.concurrent.zza.run$bridge(com.google.android.gms:play-services-basement@@18.1.0:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd(MlKitThreadPool.java:2)
at com.google.mlkit.common.sdkinternal.zzj.run(zzj.java:44)
at com.google.android.gms.cloudmessaging.zzy.run$bridge(com.google.android.gms:play-services-cloud-messaging@@17.0.0:44)
at java.lang.Thread.run(Thread.java:1012)
Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: library "libbarhopper_v3.so" not found at java.lang.Runtime.loadLibrary0(Runtime.java:1077) at java.lang.Runtime.loadLibrary0(Runtime.java:998) at java.lang.System.loadLibrary(System.java:1661) at com.google.android.libraries.barhopper.BarhopperV3.<init>(com.google.mlkit:barcode-scanning@@17.0.2:1) at com.google.mlkit.vision.barcode.bundled.internal.zza.zzc(zza.java:1) at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzbk.zza(com.google.mlkit:barcode-scanning@@17.0.2:8) at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzb.onTransact(com.google.mlkit:barcode-scanning@@17.0.2:3) at android.os.Binder.transact(Binder.java:1067) at com.google.android.gms.internal.mlkit_vision_barcode.zza.zzc(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.0.0:2) at com.google.android.gms.internal.mlkit_vision_barcode.zzox.zze(zzox.java:2) at com.google.mlkit.vision.barcode.internal.zzl.zza(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.0.0:3) at com.google.mlkit.vision.barcode.internal.zzi.zzc(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.0.0:3) at com.google.mlkit.vision.barcode.internal.zzi.run(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.0.0:1) at com.google.mlkit.vision.common.internal.MobileVisionBase.zza(MobileVisionBase.java:2) at com.google.mlkit.vision.common.internal.zzd.call(com.google.mlkit:vision-common@@17.1.0:60) at com.google.mlkit.common.sdkinternal.ModelResource.zza(ModelResource.java:8) at com.google.mlkit.common.sdkinternal.zzl.run(com.google.mlkit:common@@18.1.0:49) at com.google.mlkit.common.sdkinternal.zzp.run(zzp.java:2) at com.google.android.gms.common.api.internal.zacr.run$bridge(com.google.android.gms:play-services-base@@18.1.0:266) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze(MlKitThreadPool.java:4) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc(MlKitThreadPool.java:1) at com.google.mlkit.common.sdkinternal.zzi.run(zzi.java:32) at com.google.android.gms.common.util.concurrent.zza.run$bridge(com.google.android.gms:play-services-basement@@18.1.0:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd(MlKitThreadPool.java:2) at com.google.mlkit.common.sdkinternal.zzj.run(zzj.java:44) at com.google.android.gms.cloudmessaging.zzy.run$bridge(com.google.android.gms:play-services-cloud-messaging@@17.0.0:44) at java.lang.Thread.run(Thread.java:1012)
I've observed this error as well in the wild...
My app uses com.google.mlkit:barcode-scanning
, version 17.0.3 running on a Samsung Galaxy A70 with Android 11.
Yeah, it looks like 17.0.2 is running in the stacktrace but I can confirm that I had bundled 17.0.3.
I'm also seeing a similar stack trace for a single user in production:
Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: library "libbarhopper_v3.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
at java.lang.Runtime.loadLibrary0(Runtime.java:998)
at java.lang.System.loadLibrary(System.java:1661)
at com.google.android.libraries.barhopper.BarhopperV3.<init>(com.google.mlkit:barcode-scanning@@17.1.0:1)
at com.google.mlkit.vision.barcode.bundled.internal.zzb.zzc(com.google.mlkit:barcode-scanning@@17.1.0:1)
at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzbk.zza(com.google.mlkit:barcode-scanning@@17.1.0:9)
at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzb.onTransact(com.google.mlkit:barcode-scanning@@17.1.0:3)
at android.os.Binder.transact(Binder.java:1188)
at com.google.android.gms.internal.mlkit_vision_barcode.zza.zzc(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.2.0:2)
at com.google.android.gms.internal.mlkit_vision_barcode.zzsw.zze(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.2.0:2)
at com.google.mlkit.vision.barcode.internal.zzl.zza(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.2.0:3)
at com.google.mlkit.vision.barcode.internal.zzi.zze(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.2.0:3)
at com.google.mlkit.vision.barcode.internal.zzi.run(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.2.0:1)
at com.google.mlkit.vision.common.internal.MobileVisionBase.zza(com.google.mlkit:vision-common@@17.3.0:2)
at com.google.mlkit.vision.common.internal.zza.call(com.google.mlkit:vision-common@@17.3.0:4)
at com.google.mlkit.common.sdkinternal.ModelResource.zza(com.google.mlkit:common@@18.8.0:8)
at com.google.mlkit.common.sdkinternal.zzn.run(com.google.mlkit:common@@18.8.0:10)
at com.google.mlkit.common.sdkinternal.zzt.run(com.google.mlkit:common@@18.8.0:2)
at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze(com.google.mlkit:common@@18.8.0:4)
at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc(com.google.mlkit:common@@18.8.0:1)
at com.google.mlkit.common.sdkinternal.zzk.run(com.google.mlkit:common@@18.8.0:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd(com.google.mlkit:common@@18.8.0:2)
at com.google.mlkit.common.sdkinternal.zzi.run(com.google.mlkit:common@@18.8.0:2)
at java.lang.Thread.run(Thread.java:1012)
The user is running the app on a OnePlus 8T which is using an ABI that is common to many other devices, so it's an interesting issue.
I also encountered the same problem, but unfortunately, the latest version of 17.2.0 does not have 32-bit .so support. I look forward to someone supporting it
17.2.0 has the same issue.
Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: library "libbarhopper_v3.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
at java.lang.Runtime.loadLibrary0(Runtime.java:998)
at java.lang.System.loadLibrary(System.java:1656)
at com.google.android.libraries.barhopper.BarhopperV3.<init>(com.google.mlkit:barcode-scanning@@17.2.0:1)
at com.google.mlkit.vision.barcode.bundled.internal.zzb.zzc(zzb.java:1)
at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzbk.zza(com.google.mlkit:barcode-scanning@@17.2.0:9)
at com.google.android.gms.internal.mlkit_vision_barcode_bundled.zzb.onTransact(com.google.mlkit:barcode-scanning@@17.2.0:3)
at android.os.Binder.transact(Binder.java:1070)
at com.google.android.gms.internal.mlkit_vision_barcode.zza.zzc(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.3.0:2)
at com.google.android.gms.internal.mlkit_vision_barcode.zzvt.zze(zzvt.java:2)
at com.google.mlkit.vision.barcode.internal.zzn.zza(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.3.0:3)
at com.google.mlkit.vision.barcode.internal.zzk.zze(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.3.0:3)
at com.google.mlkit.vision.barcode.internal.zzk.run(com.google.android.gms:play-services-mlkit-barcode-scanning@@18.3.0:1)
at com.google.mlkit.vision.common.internal.MobileVisionBase.zza(MobileVisionBase.java:2)
at com.google.mlkit.vision.common.internal.zza.call(com.google.mlkit:vision-common@@17.3.0:60)
at com.google.mlkit.common.sdkinternal.ModelResource.zza(ModelResource.java:8)
at com.google.mlkit.common.sdkinternal.zzn.run(com.google.mlkit:common@@18.9.0:65)
at com.google.mlkit.common.sdkinternal.zzt.run(com.google.mlkit:common@@18.9.0:2)
at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze(MlKitThreadPool.java:4)
at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc(MlKitThreadPool.java:1)
at com.google.mlkit.common.sdkinternal.zzk.run(zzk.java:26)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd(MlKitThreadPool.java:2)
at com.google.mlkit.common.sdkinternal.zzi.run(zzi.java:30)
at java.lang.Thread.run(Thread.java:920)
Issue still exists :/
Issue still exists :/
Using the v7 architecture with. so in your local jni directory can solve the problem
Issue still exists :/
Using the v7 architecture with. so in your local jni directory can solve the problem How is that?
Me too facing the same issue:
i have puted my .so file in this directory:
app/src/main/jniLibs/arm64-v8a
and in kotlin trying to access the lib like this: `class MainActivity: FlutterActivity() { external fun helloFromC() companion object { // Load the JNI shared library init { try { System.loadLibrary("hello") } catch (e: UnsatisfiedLinkError) { System.loadLibrary("hello") } } } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // Call the native function helloFromC() print("ENCRYPTIONMSG : ${helloFromC()}") }
} `
and here is my grade file as well:
sourceSets { main{ java.srcDirs += 'src/main/kotlin' jniLibs.srcDirs = ['src/main/jniLibs'] } }
but getting this error : E/AndroidRuntime(11100): FATAL EXCEPTION: main E/AndroidRuntime(11100): Process: com.example.encryption_message, PID: 11100 E/AndroidRuntime(11100): java.lang.UnsatisfiedLinkError: dlopen failed: library "libhello.so" not found E/AndroidRuntime(11100): at java.lang.Runtime.loadLibrary0(Runtime.java:1082) E/AndroidRuntime(11100): at java.lang.Runtime.loadLibrary0(Runtime.java:1003) E/AndroidRuntime(11100): at java.lang.System.loadLibrary(System.java:1661) E/AndroidRuntime(11100): at com.example.encryption_message.MainActivity.<clinit>(MainActivity.kt:14) E/AndroidRuntime(11100): at java.lang.Class.newInstance(Native Method) E/AndroidRuntime(11100): at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95) E/AndroidRuntime(11100): at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45) E/AndroidRuntime(11100): at android.app.Instrumentation.newActivity(Instrumentation.java:1378) E/AndroidRuntime(11100): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3676) E/AndroidRuntime(11100): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922) E/AndroidRuntime(11100): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) E/AndroidRuntime(11100): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) E/AndroidRuntime(11100): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) E/AndroidRuntime(11100): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) E/AndroidRuntime(11100): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(11100): at android.os.Looper.loopOnce(Looper.java:205) E/AndroidRuntime(11100): at android.os.Looper.loop(Looper.java:294) E/AndroidRuntime(11100): at android.app.ActivityThread.main(ActivityThread.java:8176) E/AndroidRuntime(11100): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(11100): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) E/AndroidRuntime(11100): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
This method solved my problem and I hope it helps you. https://github.com/googlesamples/mlkit/issues/483#issuecomment-1899917791
I used mlkit,build apk can used,but aab is not used ,running always crashed