title: How to create a signed APK file using Cordova command line interface?
body: <p>I made a sample application named <code>checkStatus</code>. Now I want to create a signed APK file. So I can install it in different devices for my testing.</p>
  
  <p>For this, I Googled and found this <a href="http://vincentpeters.be/signing-a-cordova-android-apk-from-the-command-line/" rel="noreferrer">documentation</a>.</p>
  
  <p>As per the document, I switched to my project directory and ran the following command:</p>
  
  <pre><code>keytool -genkey -v -keystore key-name.keystore -alias alias-name -keyalg RSA -keysize 2048 -validity 10000
  </code></pre>
  
  <p>After I ran the above command, I got a file named <code>key-name.keystore</code> at <code>projectRoot/key-name.keystore</code>.</p>
  
  <p>And then I copy-pasted that file into <code>projectRoot/platforms/android/key-name.keystore</code>.</p>
  
  <p>After that, I created a file named <code>ant.properties</code> and saved it in <code>projectRoot/platforms/android</code>.</p>
  
  <p>I wrote the following code inside the file:</p>
  
  <pre><code>key.store=projectRoot/key-name.keystore
  key.alias=myApp
  </code></pre>
  
  <p>After that, I ran the following command to release</p>
  
  <pre><code>Cordova builds android --release
  </code></pre>
  
  <p>It's throwing the following error:</p>
  
  <pre><code> /home/projectRoot/platforms/android/cordova/node_modules/q/q.js:126
                  throw e;
                        ^
  Error code 1 for command: ant with args: release,-f,/home/projectRoot/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
  
   Error: /home/projectRoot/platforms/android/cordova/build: Command failed with exit code 8
  at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
  at ChildProcess.EventEmitter.emit (events.js:98:17)
  at maybeClose (child_process.js:753:16)
  at Process.ChildProcess._handle.onexit (child_process.js:820:5)
  </code></pre>
  
  <p>So this time, I modified <code>key.store</code> value in <code>ant.properties</code> file like in the following way.</p>
  
  <pre><code> key.store=/home/projectRoot/platforms/android/key-name.keystore
  </code></pre>
  
  <p>Again, I ran the <code>cordova build android --release</code> command. It throws the same error.</p>
  
  <p>Can anyone tell me what I've done wrong?</p>