title: Ionic can't build the android app, ANDROID_HOME not found, but is set
body: <p>I set both ANDROID_HOME and PATH for tools.</p>
  
  <p>my <code>.bashrc</code> ends with</p>
  
  <pre><code>export PATH="$PATH:/home/toskan/dev/android-sdk-linux/tools:/home/toskan/dev/android-sdk-linux/platforms"
  export ANDROID_HOME=/home/toskan/dev/android-sdk-linux
  </code></pre>
  
  <p>if I <code>echo $PATH</code> i get</p>
  
  <pre><code>$ echo $PATH
  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/toskan/dev/android-sdk-linux/tools:/home/toskan/dev/android-sdk-linux/platforms
  </code></pre>
  
  <p>if I <code>echo $ANDROID_HOME</code></p>
  
  <p>I get</p>
  
  <pre><code>$ echo $ANDROID_HOME 
  /home/toskan/dev/android-sdk-linux
  </code></pre>
  
  <p>When I run
  <code>$ sudo ionic build android</code></p>
  
  <p>I get</p>
  
  <pre><code>toskan@mycomp:~/IdeaProjects/myappmaster$ sudo ionic build android
  Running command: /home/toskan/IdeaProjects/myappmaster/hooks/after_prepare/010_add_platform_class.js /home/toskan/IdeaProjects/myappmaster
  add to body class: platform-android
  Running command: /home/toskan/IdeaProjects/myappmaster/hooks/after_prepare/020_remove_sass_from_platforms.js /home/toskan/IdeaProjects/myappmaster
  Running command: /home/toskan/IdeaProjects/myappmaster/platforms/android/cordova/build
      [Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]
  ERROR building one of the platforms: Error: /home/toskan/IdeaProjects/myappmaster/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/toskan/IdeaProjects/myappmaster/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:134:23)
  at ChildProcess.emit (events.js:110:17)
  at maybeClose (child_process.js:1015:16)
  at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
  </code></pre>
  
  <p><code>ANDROID_HOME</code> is set and the command in the commandline
  <code>android</code></p>
  
  <p>opens the android package manager</p>
  
  <p>what am I missing?</p>