In cordova 6.2.0, it has an easy way to create release build. refer to other steps here Steps 1, 2 and 4
cd cordova/ #change to root cordova folder
platforms/android/cordova/clean #clean if you want
cordova build android --release -- --keystore="/path/to/keystore" --storePassword=password --alias=alias_name #password will be prompted if you have any