title: PhoneGap Android Error "create.bat exit code 8"
body: <p>Iam followed a guide to create my first project on PhoneGap and I wanted to run it on a Android Emulator. So I typed</p>
  
  <pre><code>phonegap run android
  </code></pre>
  
  <p>Some stuff loaded but than I got the following error:</p>
  
  <pre><code>C:\Users\Thomas\form&gt;phonegap run android
  [phonegap] detecting Android SDK environment...
  [phonegap] using the local environment
  [phonegap] adding the Android platform...
  
  C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:126
                      throw e;
                            ^
  Error: ERROR : executing command 'ant', make sure you have ant installed and add
  ed to your path.
      at C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\lib\check_reqs.js:4
  7:27
      at ChildProcess.exithandler (child_process.js:652:7)
      at ChildProcess.emit (events.js:98:17)
      at maybeClose (child_process.js:756:16)
      at Socket.&lt;anonymous&gt; (child_process.js:969:11)
      at Socket.emit (events.js:95:17)
      at Pipe.close (net.js:465:12)
  { [Error: C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\create.bat: Comm
  and failed with exit code 8] code: 8 }
     [error] C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\create.bat: Com
  mand failed with exit code 8
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>After following the instructions I installed ant and didnt get the error anymore. But there are still some other errors:</p>
  
  <pre><code>C:\Users\Thomas\form&gt;phonegap build android
  [phonegap] detecting Android SDK environment...
  [phonegap] using the local environment
  [phonegap] adding the Android platform...
  
  C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:126
                      throw e;
                            ^
  Error: An error occurred while listing Android targets
      at C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\lib\check_reqs.js:87:29
      at _rejected (C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:808:24)
      at C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:834:30
      at Promise.when (C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:1079:31)
      at Promise.promise.promiseDispatch (C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:752:41)
      at C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:574:44
      at flush (C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:108:17)
      at process._tickCallback (node.js:419:13){ [Error: C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\create.bat: Command failed with exit code 8] code: 8 }
     [error] C:\Users\Thomas\.cordova\lib\android\cordova\3.5.0\bin\create.bat: Command failed with exit code 8
  </code></pre>
  
  <p>EDIT2: Ok I solved the problem. I needed to install JAVA JDK, Android SDK and assign some environmental variables...</p>
  
  <p>Best regards</p>