问题描述
我想使用在谷歌的新功能播放服务(视觉),以QR code扫描添加到我的应用程序。但是,当我跑我的应用程序,我得到这样的:
I'm trying to use the new feature in Google Play Services (Vision) to add QR code scanning to my application. But when I run my app I get this:
I/Vision﹕ Supported ABIS: [armeabi-v7a, armeabi]
D/Vision﹕ Library not found: /data/data/com.google.android.gms/files/com.google.android.gms.vision/barcode/libs/armeabi-v7a/libbarhopper.so
I/Vision﹕ Requesting barcode detector download.
我已经宣布吧code依赖按教程:
I have declared barcode dependency as per tutorial:
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="barcode" />
我试图重新安装应用程序,并重新启动手机,没有什么帮助。
I tried reinstalling the app and restarting the phone, nothing helps.
使用谷歌播放服务7.8,设备上安装的版本是7.8.11。
Using Google Play Services 7.8, version installed on the device is 7.8.11.
compile 'com.google.android.gms:play-services-vision:7.8.0'
用于创建栏code探测器code:
Code used for creating the barcode detector:
boolean initBarcodeDetector() {
final BarcodeTrackerFactory barcodeTrackerFactory = new BarcodeTrackerFactory(this);
final MultiProcessor<Barcode> multiProcessor = new MultiProcessor.Builder<>(barcodeTrackerFactory)
.build();
barcodeDetector = new BarcodeDetector.Builder(this)
.build();
barcodeDetector.setProcessor(multiProcessor);
if (barcodeDetector.isOperational() == false) {
Toast.makeText(this, R.string.barcode_not_operational, Toast.LENGTH_LONG).show();
finish();
return false;
}
return true;
}
上述接近返回false,结束活动,因为吧codeDetector.isOperational()
返回假
。
推荐答案
它开始工作后,我清空缓存,并释放了一些空间。我只有400MB可用空间,并没有错误消息这将表明。
It started working after I cleared cache and freed up some space. I had "only" 400mb free space and there was no error message which would indicate that.
这篇关于谷歌愿景吧code库未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!