I get the error when build ionic project on android platform:
ionic cordova build android
Could not find :barcodescanner:. Searched in the following locations: file:/Users/user/Library/Android/sdk/extras/m2repository//barcodescanner//barcodescanner-.pom file:/Users/user/Library/Android/sdk/extras/m2repository//barcodescanner//barcodescanner-.aar file:/Users/user/Library/Android/sdk/extras/google/m2repository//barcodescanner//barcodescanner-.pom file:/Users/user/Library/Android/sdk/extras/google/m2repository//barcodescanner//barcodescanner-.aar file:/Users/user/Library/Android/sdk/extras/android/m2repository//barcodescanner//barcodescanner-.pom file:/Users/user/Library/Android/sdk/extras/android/m2repository//barcodescanner//barcodescanner-.aar https://jcenter.bintray.com//barcodescanner//barcodescanner-.pom https://jcenter.bintray.com//barcodescanner//barcodescanner-.aar https://maven.google.com//barcodescanner//barcodescanner-.pom https://maven.google.com//barcodescanner//barcodescanner-.aar https://repo1.maven.org/maven2//barcodescanner//barcodescanner-.pom https://repo1.maven.org/maven2//barcodescanner//barcodescanner-.aar file:/Users/user/developer/project/platforms/android/app/libs/barcodescanner-.aar file:/Users/user/developer/project/platforms/android/app/libs/barcodescanner.aar Required by: project :app
this is my ionic enviroment:
cli packages: (/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:
$ 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
anybody for help?
This is caused by an incompatibility between cordova-android 7 and the plugin. 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
cordova plugin add https://github.com/phonegap/phonegap-plugin-barcodescanner
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With