When I use the command: cordova build --release android the CLI throws the following error:
Error: Cannot find module 'minimatch'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\Users\sologic\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\glob\glob.js:44:17)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
But when I use Ionic Lab (Windows Installer) and using the Build option - it generates 'android-debug.apk' & 'android-debug-unaligned.apk' in the android\build\outputs\apk folder.
Note that it is not generating android-release-unsigned.apk
My questions are:
1: What is wrong with the CLI ??
2: can I use the android-debug-unaligned.apk for Signing (with jarsigner) and Aligning (with zipalign ) for submitting on Google Play ??
Please advice.
Nothing went wrong with IONIC CLI at this time (v1.7.6), because I'm using it every day.
ionic --version and see if your version is lower than 1.7.6.npm install -g ionic again to install the lasted version of Ionic CLI.ionic start appName blankionic platform add androidionic build android --releaseYou can't use the debug apk for Google Play because they can read your APK and check if is is debug or release version. But I think you can set the debug mode in your AndroidManifest.xml to false and try like this:
android:debuggable="false" to the <application> element.Ionic also provide a package cloud service very helpful for non-plugin project inside the Ionic CLI. It can build all your project in the cloud in a minute and you can download the apk anytime.
ionic package build android an wait for the progress to done.ionic package list to get the list and see the status if it has been done the building progress.ionic package download [id] to download your apk to your project folder. id is the number you see in the list.profile (keystore).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With