One solution is to create an APK from the console:
$ cordova platform add android
and then for the very creation of the installer:
$ cordova build --release
then you will have the application but it will not be signed and will be called something like this:
app-release-unsigned.apk
in order to sign it you must first make a key and then sign your application with this key:
$ keytool -genkey -v -keystore android.keystore -alias android-app-key -keyalg RSA -keysize 2048 -validity 10000
sign the application:
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore android.keystore app-release-unsigned.apk android-app-key
just try not to forget your alias and keystore because they will ask you this:
# if zipalign is not installed $ sudo apt install zipalign $ zipalign -v 4 app-release-unsigned.apk app-release.apk
and in the end you will have this file:
app-release.apk
Good luck :)