The APK genration process is achieved by Cordova. The suggested version for Cordova CLI is 7.1.0 , You can go with the latest version also, In case an Error is encountered, follow the below command to install Cordova CLI 7.1.0
$ sudo npm unistall cordova -g
$ sudo npm install -g cordova@7.1.0
$ npm install