title: Android Studio Won't Use Brew Cask Android-SDK Directory
body: <p>We try to maintain scripts to rapidly onboard new developers and maintain consistency across teams/members.  We used to install the Android SDK and NDK tools via command line as part of our scripts, download all the platforms we need and tools, and then setup android studio to use them.  Since the release of Android 26 this doesn't seem possible and Android wants it to all be done via Studio.  Is there any reason why the below scenario would not work?</p>
  
  <p>Mac OSX
  Android Studio: 2.3.3 - Installed via <code>brew cask install android-studio</code> (Homebrew)</p>
  
  <p>Android-SDK 26: Installed via <code>brew cask install android-sdk</code></p>
  
  <p>Android rc file (sourced in bash_profile)</p>
  
  <pre><code>export ANDROID_SDK_ROOT=/usr/local/share/android-sdk
  export ANDROID_HOME=/usr/local/share/android-sdk/
  export ANDROID_NDK_HOME=/usr/local/share/android-ndk
  </code></pre>
  
  <p>Steps to reproduce:</p>
  
  <ol>
  <li>Install above dependencies using homebrew cask.</li>
  <li>Update environment variables (export them in bash profile or the like). </li>
  <li>Open android studio -  It should prompt to install the SDK.</li>
  <li>Attempt to use the <code>share</code> sdk (android sdk root path above).</li>
  <li>Android Studio says sdks is not valid nor empty.</li>
  </ol>