Barcode scanner plugin failing to build on android - missing zxing

  • 1
  • Question
  • Updated 4 years ago
The android build of my app which uses the plug-in "phonegap-plugin-barcodescanner" is failing with the error "/project/src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java:26: error: package com.google.zxing.client.android does not exist".

I have not changed anything about my usage of the plug-in and this used to work.
Thanks.
Photo of Simon Mathews

Simon Mathews

  • 4 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
That plugin had a major update two weeks ago. It now requires Cordova@Android 5.x.

You should build with PGB cli-6.1.0 or alternatively use an older version of the plugin
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Simon,
you can always check the current compiler for each platform under:

Docs -> Configuring -> Preferences -> Multi-Platform -> phonegap-version

in that section is a link under words "currently supported versions here"

Best of Luck
Jesse
Photo of Simon Mathews

Simon Mathews

  • 4 Posts
  • 0 Reply Likes
Thank-you - changing to cli-6.1.0 worked for me.