После установки Admob, версия Firebase конфликтует - React Native - PullRequest
0 голосов
/ 09 октября 2019

После установки пакета Admob https://www.npmjs.com/package/react-native-admob Npm версия firebase конфликтует, я устала от всех проблемных ссылок предыдущей версии, но после этого также не могу исправить эту ошибку.

What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[16.5.
  0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

  Dependency failing: com.google.android.gms:play-services-measurement-api:16.5.0 -> com.google.android.gms:play-services-
  measurement-impl@[16.5.0], but play-services-measurement-impl version was 17.0.0.

  The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
  ifact with the issue.
  -- Project 'app' depends onto com.google.firebase:firebase-analytics@{strictly 16.5.0}
  -- Project 'app' depends onto com.google.android.gms:play-services-ads@{strictly 18.2.0}
  -- Project 'app' depends on project 'react' which depends onto com.google.android.gms:play-services-ads@+
  -- Project 'app' depends onto com.google.android.gms:play-services-measurement-impl@{strictly 17.0.0}
  -- Project 'app' depends onto com.google.android.gms:play-services-ads-lite@{strictly 18.2.0}
  -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@{strictly 16.5.0}
  -- Project 'app' depends onto com.google.firebase:firebase-core@16.0.9
  -- Project 'app' depends onto com.google.android.gms:play-services-measurement-sdk@{strictly 17.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-core@{strictly 16.0.9}
  -- Project 'app' depends onto com.google.android.gms:play-services-measurement@{strictly 17.0.0}

  For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
  endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
  github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
  uild.gradle file.`

Это мой файл build.gradle android / app / gradle

   `implementation project(':react-native-admob')
    implementation project(':react-native-svg')
    implementation project(':react-native-share')
    implementation project(':@react-native-community_netinfo')
    implementation project(':react-native-document-picker')
    implementation project(':react-native-vector-icons')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.google.android.gms:play-services-base:16.1.0"
    implementation "com.google.firebase:firebase-core:16.0.9"
    implementation "com.google.firebase:firebase-storage:17.0.0"
    implementation "com.google.firebase:firebase-perf:17.0.2"
    implementation "com.facebook.react:react-native:+"  // From node_modules`

В конце файла

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) apply plugin: "com.android.application" apply plugin: "com.google.firebase.firebase-perf" apply plugin: 'com.google.gms.google-services'

android / build.gradle

       `classpath("com.android.tools.build:gradle:3.4.1")
        classpath 'com.google.gms:google-services:4.2.0'
        classpath 'com.google.firebase:perf-plugin:1.2.1'`
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...