Running command `cordova run android --release` builds the app successfully, both unsigned and signed/zip-aligned versions. However, it then tries to use the unsigned version of the APK. Here are the last lines of the output:
Total time: 31.35 secs
Built the following apk(s):
Using apk: C:/XXXXX/platforms/android/build/outputs/apk/android-armv7-release-unsigned.apk
ERROR running one or more of the platforms: Failed to install apk to device: pkg: /data/local/tmp/android-armv7-release-unsigned.apk
You may not have the required environment or OS to run this project
It has worked before I updated Cordova with 'npm install -g cordova'.
I specify signing properties in a file 'release-signing.properties', which I copy to platforms/android/ folder. During the run/build I get prompted for the password, just as it has always been.
I believe it is just a problem of choosing the wrong APK from the list of built APKs (Cordova probably chooses the one that comes earlier lexicographically)