title: CircleCI - SDK location not found for Android Studio project
body: <p>While attempting to build the project on CircleCI, the following error occurs during the gradle build. What is the cause for this issue? I am running <strong>CircleCI 2.0</strong>.</p>
  
  <blockquote>
    <p>FAILURE: Build failed with an exception.</p>
    
    <ul>
    <li><p>What went wrong: A problem occurred configuring project ':app'.</p>
    
    <blockquote>
      <p>SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.</p>
    </blockquote></li>
    <li><p>Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.</p></li>
    <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p></li>
    </ul>
    
    <p>BUILD FAILED in 18s Exited with code 1</p>
  </blockquote>
  
  <p><strong>This is what my config.yml looks like:</strong></p>
  
  <pre><code># Java Gradle CircleCI 2.0 configuration file
  #
  # Check https://circleci.com/docs/2.0/language-java/ for more details
  #
  version: 2
  jobs:
    build:
      docker:
        # specify the version you desire here
        - image: circleci/openjdk:8-jdk
  
        # Specify service dependencies here if necessary
        # CircleCI maintains a library of pre-built images
        # documented at https://circleci.com/docs/2.0/circleci-images/
        # - image: circleci/postgres:9.4
  
      working_directory: ~/repo
  
      environment:
        # Customize the JVM maximum heap limit
        JVM_OPTS: -Xmx3200m
        TERM: dumb
  
      steps:
        - checkout
  
        # Download and cache dependencies
        - restore_cache:
            keys:
            - v1-dependencies-{{ checksum "build.gradle" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-
  
        - run: gradle dependencies
  
        - save_cache:
            paths:
              - ~/.m2
            key: v1-dependencies-{{ checksum "build.gradle" }}
  
        # run tests!
        - run: gradle test
  </code></pre>