连接react-native-firebase动态链接后无法构建应用

时间:2019-09-11 08:50:46

标签: android firebase react-native firebase-dynamic-links

下面是我的项目app/build.gradle文件中的依赖项列表。

implementation project(':react-native-firebase')
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-ads:17.1.3'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-config:16.3.0'
implementation "com.google.firebase:firebase-dynamic-links:19.0.0"
implementation "com.google.firebase:firebase-invites:17.0.0"
implementation 'com.google.android.gms:play-services-base:15.0.1'

根据react-native-firebase文档添加了动态链接和邀请,以添加动态链接功能。但是添加之后,我将无法执行react-native run-android

运行react-native run-android命令时显示的错误如下所示。我尝试了各种版本,但一个或另一个似乎总是存在冲突。

Execution failed for task ':app:preDebugBuild'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[16.3.
  0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

  Dependency failing: com.google.firebase:firebase-measurement-connector-impl:17.0.5 -> com.google.firebase:firebase-analy
  tics@[16.3.0], but firebase-analytics version was 16.4.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.4.0}
  -- Project 'app' depends onto com.google.firebase:firebase-measurement-connector-impl@{strictly 17.0.5}
  -- Project 'app' depends onto com.google.firebase:firebase-invites@{strictly 17.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-ads@17.1.3
  -- Project 'app' depends onto com.google.firebase:firebase-core@{strictly 16.0.7}
  -- Project 'app' depends onto com.google.firebase:firebase-ads@{strictly 17.1.3}
  -- Project 'app' depends onto com.google.firebase:firebase-invites@17.0.0
  -- Project 'app' depends onto com.google.android.gms:play-services-appinvite@{strictly 17.0.0}
  -- Project 'app' depends onto com.google.firebase:firebase-core@16.0.7

那么,我该如何找出正确的版本呢?任何帮助将不胜感激。还请发表评论,让我知道是否需要我提供任何其他信息来帮助解决此问题。预先感谢

0 个答案:

没有答案