title: Set Android_HOME for TeamCity build server
body: <p>I have tried to execute a Gradle task in TeamCity for an Android project, but it fails with following error:</p>
  
  <pre><code>java.lang.RuntimeException: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
  </code></pre>
  
  <p>I search about that and found following suggestion:
  <a href="https://stackoverflow.com/questions/22765997/android-sdk-location-vs-build-server-how-to-set-it">Android SDK location vs Build Server, how to set it?</a></p>
  
  <pre><code>setting ANDROID_HOME variable inside TeamCity server file - buildAgent.properties
  </code></pre>
  
  <p>I opened buildAgent.properties under TeamCity/BuidAgent/conf, and add following:</p>
  
  <pre><code>sdk.dir=/Users/ali/Library/Android/sdk
  </code></pre>
  
  <p>but it still fails with the same error message. Do you know what am I missing?</p>