title: Flutter Build failed with an exception for Geolocation plugin
body: <p>Whenever I'm trying to include flutter <code>geolocation</code>(<a href="https://github.com/loup-v/geolocation" rel="nofollow noreferrer">https://github.com/loup-v/geolocation</a>) plugin I'm getting following error.</p>
  
  <pre><code>Initializing gradle...
  Resolving dependencies...
  Running 'gradlew assembleDebug'...
  registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
  &gt; java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 3s
  Finished with error: Gradle build failed: 1
  </code></pre>
  
  <p>My <code>pubspec.yml</code> dependancies list is</p>
  
  <pre><code>dependencies:
    flutter:
      sdk: flutter
    google_sign_in: "^3.0.2"
    firebase_auth: "^0.5.5"
    shared_preferences: "^0.4.1"
    cloud_firestore: "^0.7.2"
    firebase_storage: "^0.2.5"
    image_picker: "^0.4.1"
    progress_hud: "^0.2.2"
    cached_network_image: "^0.4.1"
    intl: "^0.15.6"
    path: "^1.5.1"
    geolocation: "^0.2.1"
  </code></pre>
  
  <p>My <code>app&gt;build.gradle</code> code</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 27
  
      lintOptions {
          disable 'InvalidPackage'
      }
  
      defaultConfig {
          // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
          applicationId "com.bhramaan.bhramaan"
          minSdkVersion 16
          targetSdkVersion 27
          versionCode 1
          versionName "1.0"
          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.1'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  }
  
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>What's going wrong?</p>