adding firebase to flutter project and getting FAILURE: Build failed with an exception error : <p>for [this flutter library][1] as <code>barcode scanner</code> i should to adding <code>firebase</code> to project, but after doing that i get this error and i cant fix that yet</p>

<blockquote>
  <p>Launching lib\main.dart on WAS LX1A in debug mode... Initializing
  gradle... Resolving dependencies...
  * Error running Gradle: ProcessException: Process "E:\Projects\Flutter\barcode_scanner\android\gradlew.bat" exited
  abnormally:</p>
  
  <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li><p>Where: Build file 'E:\Projects\Flutter\barcode_scanner\android\app\build.gradle' line:
  14</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="noreferrer">https://help.gradle.org</a></p></li>
  </ul>
  
  <p>BUILD FAILED in 6s   Command:
  E:\Projects\Flutter\barcode_scanner\android\gradlew.bat app:properties</p>
  
  <p>Finished with error: Please review your Gradle project setup in the
  android/ folder.</p>
</blockquote>

<p>line 14 is:</p>

<pre><code>apply plugin: 'com.android.application'
</code></pre>

<p>I'm not sure whats problem and this is my implementation about that</p>

<p><code>pabspec.yaml</code> content:</p>

<pre><code>version: 1.0.0+1
environment:
  sdk: '&gt;=2.0.0-dev.28.0 &lt;3.0.0'

dependencies:
  flutter:
    sdk: flutter
  firebase_core: ^0.4.0
  ...
...
</code></pre>

<p><code>android/build.gradle</code> content:</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><code>android/app/build.gradle</code> content:</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.")
}

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 "barcodescanner.pishguy.barcode_scanner"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.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'
    implementation 'com.google.firebase:firebase-core:17.0.1'
    androidTestImplementation 'androidx.test:runner:1.3.0-alpha01'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'
}
apply plugin: 'com.google.gms.google-services'
</code></pre>

<p>running <code>flutter</code> command:</p>

<pre><code>E:\Projects\Flutter\barcode_scanner&gt;flutter pub get
Running "flutter pub get" in barcode_scanner...                     2.7s


  [1]: https://github.com/facundomedica/fast_qr_reader_view
</code></pre>
