#flutter #flutter-dependencies
#flutter #flutter-зависимости
Вопрос:
Я получаю приведенную ниже ошибку при запуске приложения после добавления 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:
Удаление приведенной ниже строки из файла app build.gradle решило проблему для меня.
implementation 'com.google.firebase:firebase-core:16.0.1'