Error when using cordova plugin app-version


I’m using Ionic 4 + capacitor and trying to use the cordova app-version plugin. I add the plugin using “npm install cordova-plugin-app-version” followed by “npm install --save @ionic/app-version@latest”.
I then do npx cap sync and npx cap open android.
I try then to build in android studio and get the following error:
“Unable to find a matching configuration of project :capacitor-android-plugins: None of the consumable configurations have attributes.”
Before adding the above, all was working fine.
Any idea what is going on and how to fix?
Thank you for any hints !


Ok the problem I had has been solved (solution: updated Capacitor in my project, the module “capacitor-android-plugins” has been renamed to “capacitor-cordova-android-plugins”)…

The project now compiles, however the getVersionNumber() function does not return a value. Actually it goes into the “catch” block of the promise resolution in which I have a “console.log()” to see the error, but even THAT is not executed… it’s as if the call is “ignored” and nothing happens…

Any ideas ?