title: PhoneGap/Cordova Android Development
body: <p><strong>UPDATE 1:</strong></p>
  
  <p>This was everything I did in the end:</p>
  
  <pre><code>sudo aptitude install -y python-software-properties python g++ make
  sudo add-apt-repository -y ppa:chris-lea/node.js
  sudo aptitude update
  sudo aptitude install nodejs
  sudo aptitude install npm
  sudo npm install -g cordova
  sudo npm install -g phonegap
  phonegap create my-app
  cd my-app
  export PATH=${PATH}:/home/oshirowanen/Downloads/adt-bundle-linux-x86_64-20131030/sdk/platform-tools:/home/oshirowanen/Downloads/adt-bundle-linux-x86_64-20131030/sdk/tools
  sudo aptitude install ant
  cordova platform add android
  android create avd --name my_and --target 1
  phonegap run android
  </code></pre>
  
  <p>Was any of that not neccessary?</p>
  
  <hr>
  
  <p><strong>ORIGINAL QUESTION:</strong></p>
  
  <p>On my Ubuntu 12.04 computer, I've just installed node.js with npm and cordova:</p>
  
  <pre><code>$ node -v
  v0.10.23
  
  $ npm -v
  1.3.17
  
  $ cordova -v
  3.3.0-0.1.1
  </code></pre>
  
  <p>When I try to add android:</p>
  
  <pre><code>$ cordova platform add android
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>Creating android project...
  
  /usr/lib/node_modules/cordova/node_modules/q/q.js:126
                      throw e;
                            ^
  Error: An error occured during creation of android sub-project. 
  
  /home/oshirowanen/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
                      throw e;
                            ^
  Error: An error occurred while listing Android targets
      at /home/oshirowanen/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:87:29
      at _rejected (/home/oshirowanen/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:808:24)
      at /home/oshirowanen/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:834:30
      at Promise.when (/home/oshirowanen/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:1079:31)
      at Promise.promise.promiseDispatch (/home/oshirowanen/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:752:41)
      at /home/oshirowanen/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:574:44
      at flush (/home/oshirowanen/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:108:17)
      at process._tickCallback (node.js:415:13)
  
      at /usr/lib/node_modules/cordova/src/platform.js:244:30
      at ChildProcess.exithandler (child_process.js:641:7)
      at ChildProcess.EventEmitter.emit (events.js:98:17)
      at maybeClose (child_process.js:735:16)
      at Socket.&lt;anonymous&gt; (child_process.js:948:11)
      at Socket.EventEmitter.emit (events.js:95:17)
      at Pipe.close (net.js:466:12)
  </code></pre>
  
  <p>Anyone know why this is happening and how to resolve it?</p>
  
  <p>I get the same issue with PhoneGap.</p>