title: Android SDK error even after installing it Ionic framework
body: <p>I have have been trying to setup the environment to work with ionic and have follwed all the steps here </p>
  
  <p><a href="https://www.thepolyglotdeveloper.com/2014/09/install-android-cordova-ionic-framework-ubuntu/" rel="nofollow noreferrer">https://www.thepolyglotdeveloper.com/2014/09/install-android-cordova-ionic-framework-ubuntu/</a></p>
  
  <p>after that i was getting the error for the android SDK so i installed it but still having the same error </p>
  
  <pre><code>[Error: Please install Android target: "android-21".
  
  Hint: Open the SDK manager by running: /opt/android-sdk/tools/android
  You will require:
  1. "SDK Platform" for android-21
  2. "Android SDK Platform-tools (latest)
  3. "Android SDK Build-tools" (latest)]
  ERROR building one of the platforms: Error: /home/tasol/todo/platforms/android/cordova/build: Command failed with exit code 2
  You may not have the required environment or OS to build this project
  Error: /home/tasol/todo/platforms/android/cordova/build: Command failed with exit code 2
      at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
      at ChildProcess.emit (events.js:98:17)
      at maybeClose (child_process.js:766:16)
      at Process.ChildProcess._handle.onexit (child_process.js:833:5)
  </code></pre>
  
  <p>You can see in the attached screenshot<img src="https://i.stack.imgur.com/PER0N.png" alt="Sdk packages installed"> that all the packages are installed then also i am facing the same issue.</p>
  
  <p>Can anyone please help me. Thanks in advance.</p>
  
  <p>Using: Ubuntu 14.04</p>
  
  <p><img src="https://i.stack.imgur.com/RYAh9.png" alt="enter image description here">
  I have got rid of that error by following Tim's answer as i am a php developer and this is my first time with android sdk sorry if i sounds nube</p>
  
  <p>The above error solved with the answer provided by Tim  but now i am facing some new errors so updating the answer with them </p>
  
  <pre><code>ERROR : No emulator images (avds) found.
  1. Download desired System Image by running: /opt/android-sdk/tools/android sdk
  2. Create an AVD by running: /opt/android-sdk/tools/android avd
  HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
  </code></pre>
  
  <p>I have downloaded full package for 21 and now which image i should install and what is AVD its asking for</p>