简体   繁体   English

IONIC 3 BarcodeScanner崩溃了android构建

[英]IONIC 3 BarcodeScanner crashes android build

I get the error when build ionic project on android platform: 我在android平台上构建离子项目时遇到错误:

ionic cordova build android

this is my ionic enviroment: 这是我的离子环境:

cli packages: (/usr/local/lib/node_modules) cli包:(/ usr / local / lib / node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages: 全球套餐:

cordova (Cordova CLI) : 8.0.0 

local packages: 本地包裹:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System: 系统:

Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2 
ios-sim           : 5.0.1 
Node              : v8.9.3
npm               : 5.6.0 
OS                : macOS High Sierra
Xcode             : Xcode 9.2 Build version 9C40b 

I created the new and blank ionic project and added the native barcodescanner plugin following the commands: 我创建了新的空白离子项目,并按照命令添加了原生barcodescanner插件:

$ ionic cordova plugin add phonegap-plugin-barcodescanner
$ npm install --save @ionic-native/barcode-scanner

The Android SDK build tools was updated in 27.0.3 version Android SDK构建工具已在27.0.3版本中更新

anybody for help? 有人帮忙吗?

This is caused by an incompatibility between cordova-android 7 and the plugin. 这是由cordova-android 7和插件之间的不兼容引起的。 Somebody already reported it and I fixed it yesterday. 有人已经报道了 ,我昨天修好了

You will have to wait until those changes are released as a new version (probably 7.0.2), or install the plugin from the github url 您将不得不等到这些更改作为新版本(可能是7.0.2)发布,或者从github url安装插件

cordova plugin add https://github.com/phonegap/phonegap-plugin-barcodescanner

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM