title: Build failed with an exception in flutter
body: <p>I am trying to connect my app with firebase while i run my app it shows an error -
  * Where:
  Build file 'D:\AndroidStudio\login\android\app\build.gradle' line: 24</p>
  
  <ul>
  <li>What went wrong:
  A problem occurred evaluating project ':app'.</li>
  </ul>
  
  <p>Here my app level build.gradle</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.mdhv.login"
          minSdkVersion 16
          targetSdkVersion 28
          versionCode flutterVersionCode.toInteger()
          versionName flutterVersionName
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
  
      buildTypes {
          release {
              // TODO: Add your own signing config for the release build.
              // Signing with the debug keys for now, so `flutter run --release` works.
              signingConfig signingConfigs.debug
          }
      }
  }
  
  flutter {
      source '../..'
  }
  
  dependencies {
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>Here my project level build.gradle</p>
  
  <pre><code>buildscript {
      repositories {
          google()
          jcenter()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:3.2.1'
          classpath 'com.google.gms:google-services:4.3.0'
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  rootProject.buildDir = '../build'
  subprojects {
      project.buildDir = "${rootProject.buildDir}/${project.name}"
  }
  subprojects {
      project.evaluationDependsOn(':app')
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  
  </code></pre>
  
  <p>After running my app it shows below error - </p>
  
  <ul>
  <li>Error running Gradle:
  ProcessException: Process "D:\AndroidStudio\login\android\gradlew.bat" exited abnormally:</li>
  </ul>
  
  <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li><p>Where:
  Build file 'D:\AndroidStudio\login\android\app\build.gradle' line: 24</p></li>
  <li><p>What went wrong:
  A problem occurred evaluating project ':app'.</p>
  
  <blockquote>
    <p>ASCII</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="nofollow noreferrer">https://help.gradle.org</a></p></li>
  </ul>
  
  <p>BUILD FAILED in 1s
    Command: D:\AndroidStudio\login\android\gradlew.bat app:properties</p>
  
  <p>Finished with error: Please review your Gradle project setup in the android/ folder.</p>
  
  <p>After running 'flutter run -v' it shows -</p>
  
  <pre><code>   Please review your Gradle project setup in the android/ folder.
  
  #0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
  #1      _readGradleProject (package:flutter_tools/src/android/gradle.dart:158:7)
  &lt;asynchronous suspension&gt;
  #2      _gradleProject (package:flutter_tools/src/android/gradle.dart:111:34)
  &lt;asynchronous suspension&gt;
  #3      getGradleAppOut (package:flutter_tools/src/android/gradle.dart:105:29)
  &lt;asynchronous suspension&gt;
  #4      AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart:160:23)
  &lt;asynchronous suspension&gt;
  #5      ApplicationPackageFactory.getPackageForPlatform (package:flutter_tools/src/application_package.dart:47:32)
  &lt;asynchronous suspension&gt;
  #6      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:352:56)
  &lt;asynchronous suspension&gt;
  #7      HotRunner.run (package:flutter_tools/src/run_hot.dart:251:39)
  &lt;asynchronous suspension&gt;
  #8      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:469:37)
  &lt;asynchronous suspension&gt;
  #9      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:478:18)
  &lt;asynchronous suspension&gt;
  #10     FlutterCommand.run.&lt;anonymous closure&gt; (package:flutter_tools/src/runner/flutter_command.dart:383:33)
  &lt;asynchronous suspension&gt;
  #11     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #12     _rootRun (dart:async/zone.dart:1124:13)
  #13     _CustomZone.run (dart:async/zone.dart:1021:19)
  #14     _runZoned (dart:async/zone.dart:1516:10)
  #15     runZoned (dart:async/zone.dart:1463:12)
  #16     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #17     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:375:20)
  #18     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
  &lt;asynchronous suspension&gt;
  #19     FlutterCommandRunner.runCommand.&lt;anonymous closure&gt;
  (package:flutter_tools/src/runner/flutter_command_runner.dart:396:21)
  &lt;asynchronous suspension&gt;
  #20     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #21     _rootRun (dart:async/zone.dart:1124:13)
  #22     _CustomZone.run (dart:async/zone.dart:1021:19)
  #23     _runZoned (dart:async/zone.dart:1516:10)
  #24     runZoned (dart:async/zone.dart:1463:12)
  #25     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #26     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
  &lt;asynchronous suspension&gt;
  #27     CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:112:25)
  #28     new Future.sync (dart:async/future.dart:224:31)
  #29     CommandRunner.run (package:args/command_runner.dart:112:14)
  #30     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
  #31     run.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:62:22)
  &lt;asynchronous suspension&gt;
  #32     _rootRun (dart:async/zone.dart:1124:13)
  #33     _CustomZone.run (dart:async/zone.dart:1021:19)
  #34     _runZoned (dart:async/zone.dart:1516:10)
  #35     runZoned (dart:async/zone.dart:1500:12)
  #36     run.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:60:18)
  &lt;asynchronous suspension&gt;
  #37     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #38     _rootRun (dart:async/zone.dart:1124:13)
  #39     _CustomZone.run (dart:async/zone.dart:1021:19)
  #40     _runZoned (dart:async/zone.dart:1516:10)
  #41     runZoned (dart:async/zone.dart:1463:12)
  #42     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #43     runInContext (package:flutter_tools/src/context_runner.dart:56:24)
  &lt;asynchronous suspension&gt;
  #44     run (package:flutter_tools/runner.dart:51:10)
  #45     main (package:flutter_tools/executable.dart:62:9)
  &lt;asynchronous suspension&gt;
  #46     main (file:///C:/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
  #47     _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/isolate_patch.dart:299:32)
  #48     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
  
  
  
  </code></pre>