title: Failed to find Platform SDK with path: platforms;android-31
body: <p>I was about to update the support SDK to the latest version of Android which is SDK 31 &quot;S&quot; but It has some issue with Gradle sync.</p>
  <p>The error</p>
  <pre><code>Failed to notify build listener.
  Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.   
  Could not create task ':app:minifyDebugWithR8'.
  Cannot query the value of this provider because it has no value available.
  Failed to stop service 'com.android.build.gradle.internal.errors.SyncIssueReporterImpl$GlobalSyncIssueService_5d47b2c0-a1a4-43ab-bbdb-bb6abdacb3ba'.
  Failed to find Platform SDK with path: platforms;android-31
  </code></pre>
  <p>This is the setup</p>
  <pre><code>compileSdk 31
  
      defaultConfig {
          applicationId &quot;com.app.app
          minSdk 21
          targetSdk 31
          versionCode 7
          versionName &quot;1.0.9&quot;
          vectorDrawables.useSupportLibrary = true
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      }
  </code></pre>
  <p>Already using the latest AGP <code>com.android.tools.build:gradle:7.1.0-alpha01</code></p>
  <p>Already install the Android &quot;S&quot; Preview tools as well.
  <a href="https://i.stack.imgur.com/QuHhg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QuHhg.png" alt="enter image description here" /></a></p>
  <p>Lastly already has the latest AS version preview</p>
  <p>Android Studio Bumblebee | 2021.1.1 Canary 1
  Build #AI-203.7717.56.2111.7361063, built on May 14, 2021</p>
  <p>Following the <a href="https://developer.android.com/about/versions/12/setup-sdk" rel="nofollow noreferrer">documentation</a> not working as well.</p>
  <pre><code>No signature of method: build_cdzmabn9imuzupf8f433s2vnq.android() is applicable for argument types: (build_cdzmabn9imuzupf8f433s2vnq$_run_closure1) values: [build_cdzmabn9imuzupf8f433s2vnq$_run_closure1@6f573027]
  </code></pre>
  <p>The Gradle sync is success with</p>
  <pre><code>compileSdkPreview &quot;android-S&quot;
  targetSdkPreview &quot;S&quot;
  </code></pre>
  <p>But the app cannot install at all on any device neither release or debug.</p>
  <p>What else should we do?</p>