title: Android Studio is not building flutter app correctly
body: <p>I have an app I'm working on and when I open <code>build.gradle</code> file
  Several errors appeared</p>
  
  <p><a href="https://i.stack.imgur.com/nKeqW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nKeqW.png" alt="enter image description here"></a></p>
  
  <pre><code>def localProperties = new Properties()
  def localPropertiesFile = rootProject.file('local.properties')
  if (localPropertiesFile.exists()) {
      localPropertiesFile.withReader('UTF-8') { reader -&gt;
          localProperties.load(reader)
      }
  }
  
  def flutterRoot = localProperties.getProperty('flutter.sdk')
  if (flutterRoot == null) {
      throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  }
  
  def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  if (flutterVersionCode == null) {
      flutterVersionCode = '1'
  }
  
  def flutterVersionName = localProperties.getProperty('flutter.versionName')
  if (flutterVersionName == null) {
      flutterVersionName = '1.0'
  }
  
  apply plugin: 'com.android.application'
  apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  
  android {
      compileSdkVersion 28
  
      lintOptions {
          disable 'InvalidPackage'
      }
  
      defaultConfig {
          // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
          applicationId "com.example.shopapp"
          minSdkVersion 16
          targetSdkVersion 28
          versionCode flutterVersionCode.toInteger()
          versionName flutterVersionName
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
  
      buildTypes {
          release {
              signingConfig signingConfigs.debug
          }
      }
  }
  
  flutter {
      source '../..'
  }
  
  dependencies {
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.1.1'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  }
  </code></pre>
  
  <p>Console Output:</p>
  
  <blockquote>
    <p>Launching lib\main.dart on AOSP on IA Emulator in debug mode...
    Running Gradle task 'assembleDebug'...</p>
    
    <p>FAILURE: Build failed with an exception.</p>
    
    <ul>
    <li><p>What went wrong: Execution failed for task ':app:stripDebugDebugSymbols'.</p>
    
    <blockquote>
      <p>No version of NDK matched the requested version 20.0.5594570. Versions available locally: 21.0.6113669</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. Run with --scan to get full insights.</p></li>
    <li><p>Get more help at <a href="https://help.gradle.org" rel="noreferrer">https://help.gradle.org</a></p></li>
    </ul>
    
    <p>BUILD FAILED in 1s Finished with error: Gradle task assembleDebug
    failed with exit code 1</p>
  </blockquote>
  
  <p>Also there is a message in logcat
  <code>Please configure Android SDK</code>
  <a href="https://i.stack.imgur.com/tVhqr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tVhqr.png" alt="enter image description here"></a>
  I looked for a solution and did not find a solution for it</p>
  
  <p>I just need help and don't know if I have violated the laws of the site because I do not speak English fluently</p>