title: How do I fix my React Native failing Android build in Gradle? com.google.firebase:firebase-iid is being requested by various other libraries
body: <p>I have tried generating a signed APK according to the instructions here: <a href="https://facebook.github.io/react-native/docs/signed-apk-android" rel="nofollow noreferrer">https://facebook.github.io/react-native/docs/signed-apk-android</a></p>
  
  <p>When running <code>./gradlew assembleRelease</code>, I get a build error as seen below. My app uses Google Firebase for authentication and tipsi-stripe as one of its main libraries. It is a detached Expo build.</p>
  
  <p>I have tried adding additional dependencies, including Firebase core in <code>app/build.gradle</code> </p>
  
  <p>The error in the terminal.</p>
  
  <pre><code>❯ ./gradlew assembleRelease
  Parallel execution is an incubating feature.
  
  {..}
  &gt; Task :tipsi-stripe:compileReleaseRenderscript FAILED
  &gt; Task :app:checkDevKernelReleaseClasspath FAILED
  &gt; Task :react-native-firebase:compileReleaseRenderscript FAILED
  
  FAILURE: Build completed with 3 failures.
  
  1: Task failed with an exception.
  -----------
  * What went wrong:
  Failed to capture fingerprint of input files for task ':tipsi-stripe:compileReleaseRenderscript' property 'importDirs' during up-to-date check.
  &gt; The library com.google.firebase:firebase-iid is being requested by various other libraries at [[16.2.0,16.2.0]], but resolves to 17.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
  
  
  ==============================================================================
  
  2: Task failed with an exception.
  -----------
  * What went wrong:
  Failed to capture fingerprint of input files for task ':app:checkDevKernelReleaseClasspath' property 'compileClasspath' during up-to-date check.
  &gt; The library com.google.firebase:firebase-iid is being requested by various other libraries at [[16.2.0,16.2.0]], but resolves to 17.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
  
  
  ==============================================================================
  
  3: Task failed with an exception.
  -----------
  * What went wrong:
  Failed to capture fingerprint of input files for task ':react-native-firebase:compileReleaseRenderscript' property 'importDirs' during up-to-date check.
  &gt; The library com.google.firebase:firebase-iid is being requested by various other libraries at [[16.2.0,16.2.0]], but resolves to 17.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
  
  
  ==============================================================================
  
  BUILD FAILED in 18s
  38 actionable tasks: 3 executed, 35 up-to-date
  </code></pre>
  
  <ul>
  <li><p>My <code>app/build.gradle</code>: <a href="https://gist.github.com/christopheragnus/35c13d31976c889268b663cbf1654ead" rel="nofollow noreferrer">https://gist.github.com/christopheragnus/35c13d31976c889268b663cbf1654ead</a></p></li>
  <li><p>My root <code>/build.gradle</code>: <a href="https://gist.github.com/christopheragnus/e6f506d6882ad37ce7656140a240f5bf" rel="nofollow noreferrer">https://gist.github.com/christopheragnus/e6f506d6882ad37ce7656140a240f5bf</a></p></li>
  </ul>
  
  <p>EDIT:</p>
  
  <p>I tried changing <code>/build.gradle</code> to use version 16.2.0, </p>
  
  <pre><code>resolutionStrategy {
           ...
            force 'com.google.firebase:firebase-iid:16.2.0'
          }
  </code></pre>
  
  <p>This resulted in a different but same type of error:</p>
  
  <pre><code>&gt; Task :tipsi-stripe:compileReleaseRenderscript FAILED
  &gt; Task :app:checkDevKernelReleaseClasspath FAILED
  &gt; Task :react-native-firebase:compileReleaseRenderscript FAILED
  
  Could not resolve all files for configuration ':tipsi-stripe:releaseCompileClasspath'.
  &gt; Could not find com.google.android.gms:play-services-measurement-api:11.8.0.
  ...
  &gt; Could not find com.google.android.gms:play-services-measurement-base:11.8.0.
  ...
  &gt; Could not find com.google.android.gms:play-services-ads-identifier:11.8.0.
  </code></pre>