我有一个条形码扫描器,使用新的android视觉库,在我的设备和其他几个设备上工作得很好。但是它突然停止工作,我在日志中看到以下异常:
No implementation found for com.google.android.gms.vision.barcode.internal.NativeBarcode[] com.google.android.gms.vision.barcode.internal.NativeBarcodeDetector.recognizeBufferNative(int, int, java.nio.ByteBuffer, com.google.android.gms.vision.barcode.internal.NativeOptions) (tried Java_com_google_android_gms_vision_barcode_internal_NativeBarcodeDetector_recognizeBufferNative and Java_com_google_android_gms_vision_barcode_internal_NativeBarcodeDetector_recognizeBufferNative__IILjava_nio_ByteBuffer_2Lcom_google_android_gms_vision_barcode_internal_NativeOptions_2)
E/CameraSource: Exception thrown from receiver.
E/CameraSource: java.lang.UnsatisfiedLinkError: No implementation found for com.google.android.gms.vision.barcode.internal.NativeBarcode[] com.google.android.gms.vision.barcode.internal.NativeBarcodeDetector.recognizeBufferNative(int, int, java.nio.ByteBuffer, com.google.android.gms.vision.barcode.internal.NativeOptions) (tried Java_com_google_android_gms_vision_barcode_internal_NativeBarcodeDetector_recognizeBufferNative and Java_com_google_android_gms_vision_barcode_internal_NativeBarcodeDetector_recognizeBufferNative__IILjava_nio_ByteBuffer_2Lcom_google_android_gms_vision_barcode_internal_NativeOptions_2)
E/CameraSource: at com.google.android.gms.vision.barcode.internal.NativeBarcodeDetector.recognizeBufferNative(Native Method)
E/CameraSource: at com.google.android.gms.vision.barcode.internal.NativeBarcodeDetector.a(SourceFile:39)
E/CameraSource: at com.google.android.gms.vision.barcode.internal.client.c.onTransact(SourceFile:61)
E/CameraSource: at android.os.Binder.transact(Binder.java:380)
E/CameraSource: at com.google.android.gms.vision.barcode.internal.client.zzb$zza$zza.zza(Unknown Source)
E/CameraSource: at com.google.android.gms.vision.barcode.internal.client.zzd.zza(Unknown Source)
E/CameraSource: at com.google.android.gms.vision.barcode.BarcodeDetector.detect(Unknown Source)
E/CameraSource: at com.google.android.gms.vision.Detector.receiveFrame(Unknown Source)
E/CameraSource: at com.google.android.gms.vision.CameraSource$zzb.run(Unknown Source)
E/CameraSource: at java.lang.Thread.run(Thread.java:818)
测试barcodeDetector.isOperational()
返回true
。有人知道吗?
这可能有助于针对Google Play Services 8.1重新编译您的应用程序。这个解决方法很快就会出现在https://developers.google.com/vision/release-notes。