首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >离子型和phonegap条形码扫描仪应用程序在android上崩溃

离子型和phonegap条形码扫描仪应用程序在android上崩溃
EN

Stack Overflow用户
提问于 2020-02-18 19:31:15
回答 1查看 877关注 0票数 1

我的离子型应用程序使用:

代码语言:javascript
复制
"@ionic-native/barcode-scanner": "^5.19.1",
"phonegap-plugin-barcodescanner": "^8.1.0",

当我打电话给barcode.scan funcion时,安卓应用程序就会崩溃。我正在做任何事情,就像在一个非常基本的例子:https://ionicframework.com/docs/native/barcode-scanner

注意:我现在正在android7版本上测试这个。这款手机不是很新,但也不是很旧。它在接受相机权限后立即崩溃。

在catch块或任何东西中没有错误消息,应用程序只是崩溃。有没有人经历过这种情况,或者能帮我调查更多的日志?

EN

回答 1

Stack Overflow用户

发布于 2020-02-18 20:36:31

我发现了这个问题,基本原因是AndroidManifest.xml文件中缺少了AndroidManifest.xml:

代码语言:javascript
复制
<activity android:configChanges="orientation|keyboardHidden" android:name="com.google.zxing.client.android.CaptureActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="com.google.zxing.client.android.SCAN" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

不知道为什么插件安装没有添加任何东西,也不知道它在github中被描述过,但是它需要清单文件的活动。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60288197

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档