title: Cordova can't find ANDROID_HOME or android in my PATH although they are there
body: <p>I set up ANDROID_HOME to my android installation dir as well as adding $ANDROID_HOME/platform-tools and $ANDROID_HOME/tools to my PATH.</p>
  
  <p>When adding the android platform to my project, cordova seems to find android as it needs to run "android update project ....." for doing so but when I'm trying to run "cordova run android" it results in the following error:</p>
  
  <pre><code>ERROR: Error: Failed to find 'ANDROID_HOME' environment variable. Try 
  setting it manually.
  enter code hereFailed to find 'android' command in your 'PATH'. Try 
  update your 'PATH' to include path to valid SDK directory.
  ERROR running one or more of the platforms: Error: 
  [PATH_TO_PROJECT]/platforms/android/cordova/run: Command failed with exit 
  code 2
  </code></pre>
  
  <p>It seems like all of a sudden cordova lost access to my environment variables or maybe it's a version conflict of some sort?</p>
  
  <p>I installed android SDK 26 as well as all API and build tools between 19 and 22 (as those are the requirements of the project)
  I am running cordova 6.0.0
  phonegap 7.0.1
  My system is a debian </p>
  
  <p>I tried everything that was suggested in all the other posts with similar issues but still no success and it still gives me the same error.</p>
  
  <p>Probably it's just a little thing I have overlooked but right now I'm clueless and thankful for any idea as to what might be causing the problem.</p>