Flutter-firebase_dynamic_links:无法通知依赖项解析侦听器

时间:2019-04-15 05:01:43

标签: flutter flutter-dependencies

添加firebase_dynamic_links依赖项后,运行应用程序时出现以下错误。

> FAILURE: Build failed with an exception.
> 
> * What went wrong: Failed to notify dependency resolution listener.
> > The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.0.0,16.0.0]], but
> resolves to 16.0.3. Disable the plugin and check your dependencies
> tree using ./gradlew :app:dependencies.
> > The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[16.1.1,16.1.1]], but
> resolves to 16.2.2. Disable the plugin and check your dependencies
> tree using ./gradlew :app:dependencies.
> 
> * 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 2s Finished with error: Gradle task assembleDebug
> failed with exit code 1

我尝试将firebase_dynamic_links的版本更改为所有可用的版本,但是没有运气。

在运行./gradlew :app:dependencies之后,我也不知道该怎么办。

下面是我的pubspec.yaml

name: socially360
description: A new Flutter project.

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2

  shared_preferences: ^0.5.1+2
  json_annotation: ^2.1.0
  built_value: ^6.3.2
  built_collection: ^4.2.0
  rxdart: ^0.21.0
  url_launcher: ^5.0.2
  intl: ^0.15.8
  firebase_messaging: ^4.0.0+1
  advanced_share: 0.1.0
  share: 0.6.1
  firebase_dynamic_links: 0.2.1

dev_dependencies:
  flutter_test:
    sdk: flutter

  build_runner: ^1.0.0
  built_value_generator: ^6.3.2

1 个答案:

答案 0 :(得分:0)

app \ build.gradle 文件中删除以下行为我解决了这个问题。

implementation 'com.google.firebase:firebase-core:16.0.1'