我的Google Vision API出现问题。
我尝试从idcard获取PDF417并获得此异常:
09-22 18:52:08.701 19216-
20545/com.google.android.gms.samples.vision.barcodereader A/art:
art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: input is
not valid Modified UTF-8: illegal start byte 0x9c
09-22 18:52:08.701 19216-
20545/com.google.android.gms.samples.vision.barcodereader A/art:
art/runtime/java_vm_ext.cc:470] input: '0x30 0x33 0x34 0x35 0x39 0x33
0x33 0x36 0x34 0x39 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0
0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80
0xc0 0x80 0x50 0x75 0x62 0x44 0x53 0x4b 0x5f 0x31 0xc0 0x80 0xc0 0x80 0xc0
0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0x31 0x38 0x30 0x37
0x34 0x36 0x39 0x38 0x30 0x30 0x38 0x30 0x34 0x34 0x39 0x34 0x39 0x38 0x53
0x41 0x41 0x56 0x45 0x44 0x52 0x41 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80
0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0
0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0x53 0x41 0x4c 0x41 0x4d 0x41 0x4e 0x43
0x41 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80
0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0x44
0x49 0x45 0x47 0x4f 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0
0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80
0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80 0xc0 0x80
09-22 18:52:08.701 19216-
20545/com.google.android.gms.samples.vision.barcodereader A/art:
art/runtime/java_vm_ext.cc:470] in call to NewStringUTF
09-22 18:52:08.701 19216-
20545/com.google.android.gms.samples.vision.barcodereader A/art:
art/runtime/java_vm_ext.cc:470] from
com.google.android.gms.vision.barcode.internal.NativeBarcode[]com.google.android.gms.vision.barcode.internal.NativeBarcodeDetector.recognizeN
ative(int, int, byte[],com.google.android.gms.vision.barcode.internal.NativeBarcodeDetector$NativeOptions)
09-22 18:52:08.701 19216-20545/com.google.android.gms.samples.vision.barcodereader A/art: art/runtime/java_vm_ext.cc:470] "Thread-2" prio=5 tid=18 Runnable
我的代码与以下示例相同:
try {
mDetector.receiveFrame(outputFrame);
} catch (Throwable t) {
t.printStackTrace();
} finally {
mCamera.addCallbackBuffer(data.array());
}
示例位于:https://github.com/googlesamples/android-vision
有什么想法吗?