Search code examples
cordovaphonegap-pluginsphonegap-buildbarcode-scannerphonegap

Barcode Scanner plugin failing when building in Adobe Build using Phonegap


I'm having a massive amount of trouble trying to get the barcode-scanner plugin from this GitHub page to build in Adobe Build. To be clear, the scanner works great itself when testing the app. But when I build the app using Adobe Build, I get an error in the log file that my cordova-android version isn't where it should be. This is the output from the log file:

Fetching plugin "phonegap-plugin-barcodescanner@~7.1.0" via npm

Installing "phonegap-plugin-barcodescanner" at "7.1.1" for android

Plugin doesn't support this project's cordova-android version. cordova-android: 6.1.2, failed version requirement: >=6.3.0

Skipping 'phonegap-plugin-barcodescanner' for android

I've been looking for hours for ways to update the cordova-android version for my project. I've tried starting new projects with the newest Phonegap CLI. And I am now at a loss for how to proceed. Any help is very much appreciated!


Solution

  • Instead of downgrading the plugin, upgrade your Phonegap CLI version so it uses a newer cordova-android. You will need to use Phonegap CLI 7.1.0 or newer, you can set it by adding this to your config.xml

    <preference name="phonegap-version" value="cli-7.1.0" />