【问题标题】:cordova phonegap barcode scanner camera error科尔多瓦 phonegap 条码扫描仪相机错误
【发布时间】:2016-04-28 15:13:36
【问题描述】:

我已经搜索了很多解决方案。并且只找到了没有帮助的旧答案。

我正在使用cordova插件添加phonegap-plugin-barcodescanner

科尔多瓦 6.1.1 条码扫描仪 4.1.0 安卓 6

我在 android 6 上部署了我的应用程序,但是当我尝试启动条形码扫描仪时收到“抱歉,android 相机遇到了问题”。

【问题讨论】:

    标签: android cordova barcode-scanner


    【解决方案1】:

    您是否在 Manifest 中设置了权限?

    <uses-permission android:name="android.permission.CAMERA" />
     <uses-feature android:name="android.hardware.camera" />
    

    【讨论】:

    • Cordova 的barcodescanner 插件不是在Android 上使用ZXing 的intent 扫描吗?在这种情况下,您不需要清单中的相机权限
    • 看起来我正在使用的插件没有授予应用程序在 Android 6 上使用相机的权限。我必须通过设置 -> 应用程序 -> 手动授予应用程序使用相机的权限(选择应用)-> 权限-> 选择相机
    猜你喜欢
    • 2018-11-09
    • 2018-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多