I\'m in trouble since yesterday. In my internship I faced the following build error, but I couldn\'t understand why :
$ cordova build android
[...]
FAILURE
cordova plugin rm cordova-plugin-compat --force
cordova platform rm android
cordova platform add android@6.3.0
cordova plugin add cordova-plugin-compat@1.2
in this order, works for me !! thanks a lot
None of the above solutions worked for me. For me the solution was upgrading gradle. I was using gradle 5.6.2. Updating to 5.6.4 then removing and adding my android platform and plugins did the trick.
brew upgrade gradle
Install / upgrade gradle on Mac OS X
rm -rf plugins/*
cordova platform rm android
cordova platform add android
I confirm that Answer by DaveAlden Works !!
But in the plugin.xml inside the cordova-plugin-compat I had a syntax error with less than sign '<', because it's illegal in xml.
This issue appears in visual studio, and you can't install plugin with the config manager because it detects this syntax error in xml on the plugin resource.
You must install with command line like DaveAlden says.
Ignore errors, And after install replace :
<engine name="cordova-android" version="<6.3.0"/>
by
<engine name="cordova-android" version="<6.3.0"/>
And compilation run at the end!! :)
I know the the question already answered, but I want to add link to the official release notes:
https://cordova.apache.org/news/2017/11/10/plugins-release.html
In our last plugins release, we deprecated cordova-plugin-compat since it got integrated into cordova-android@6.3.0. So for this release cycle, we have removed the dependency from plugins that were relying on it and gave the plugins a major version jump. The follow plugins have dropped cordova-plugin-compat: cordova-plugin-camera, cordova-plugin-contacts, cordova-plugin-file, cordova-plugin-geolocation, cordova-plugin-media, and cordova-plugin-media-capture.
So, make sure you update all listed plugins to the version posted in release notes.
i had the same error, and i didn't have compat plugin in my plugins, i just run that code, then i built, it worked fine
$ cordova platform remove android && cordova platform add android@6.2.3
Remove plugin cordova-plugin-compat forcefully android sdk above version 6.3.0 or equal because it is integrated with cordova android.
cordova plugin rm cordova-plugin-compat --force
As a reference below
https://cordova.apache.org/announcements/2017/09/27/android-release.html