title: How to fix 'android.arch.lifecycle:runtime' having different versions in compile time and runtime in Flutter?
body: <p>This is my first time connecting a flutter app with firebase. I've added the <strong>google-services.json</strong> file under <strong>android -> app</strong> directory then </p>
  
  <p><code>apply plugin: 'com.google.gms.google-services'</code> in my <strong>app:build.gradle</strong> and </p>
  
  <pre><code>dependencies {
          [...]
          classpath 'com.google.gms:google-services:3.2.1'
      }
  </code></pre>
  
  <p>in my <strong>project:build.gradle</strong> under <strong>android</strong> directory by following this guidline <a href="https://codelabs.developers.google.com/codelabs/flutter-firebase/#6" rel="nofollow noreferrer">https://codelabs.developers.google.com/codelabs/flutter-firebase/#6</a></p>
  
  <p>When I run the project, I get this error </p>
  
  <pre><code>Launching lib\main.dart on POCO F1 in debug mode...
  Initializing gradle...
  Resolving dependencies...
  Running Gradle task 'assembleDebug'...
  registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:preDebugBuild'.
  &gt; Android dependency 'android.arch.lifecycle:runtime' has different version for the compile (1.0.0) and runtime (1.1.1) classpath. You should manually set the same version via DependencyResolution
  
  * 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.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 4s
  Finished with error: Gradle task assembleDebug failed with exit code 1
  
  </code></pre>
  
  <p>After I've run <strong>gradle build --stacktrace</strong>, gradle recommended to add the below dependencies to my <strong>app:build.gradle</strong> but it doesn't work</p>
  
  <pre><code>dependencies {
      implementation("android.arch.lifecycle:runtime:1.1.1")
      implementation("android.arch.lifecycle:common:1.1.1")
      implementation("android.arch.core:common:1.1.1")
  }
  </code></pre>