SurfaceView和BarcodeScanner,isOperational返回false

时间:2018-07-25 08:58:37

标签: android google-play-services surfaceview barcode barcode-scanner

我已经在我的应用程序中实现了条形码检测。它可以在我尝试过的所有设备上运行,但是今天我注意到它不适用于Android 4.3设备。 涉及的代码是

 barcodeDetector = new BarcodeDetector.Builder(getContext()).setBarcodeFormats(Barcode.QR_CODE).build();
 if (!barcodeDetector.isOperational()) {
    //TODO something gone wrong
 } else {
    //init SurfaceView and callbacks
 }
该设备上的

和isOperational返回false。这是错误日志:

 W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite not found.
Failed to retrieve remote module version.
com.myapp W/GooglePlayServicesUtil: Google Play services out of date.  Requires 10260000 but found 4452036
com.myapp I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite:0 and remote module com.google.android.gms.vision.dynamite:0
com.myapp E/ActivityThread: Failed to find provider info for com.google.android.gms.chimera
com.myapp E/BarcodeNativeHandle: Error creating remote native handle
com.google.android.gms.dynamite.DynamiteModule$zza: No acceptable module found. Local version is 0 and remote version is 0.

我如何正确处理此错误以使条形码检测有效?

1 个答案:

答案 0 :(得分:0)

我相信您应该在模拟器/电话上更新Google Play服务。

查看这篇文章以了解更多information