flutter android构建错误执行失败了任务':app:checkReLearSeDuplicateClasses'

发布于 2025-01-19 13:40:10 字数 1050 浏览 0 评论 0原文

当“ flutter run”命令时,我遇到了这个错误。

失败:构建失败,例外。

  • 出了什么问题: 执行任务失败':app:checkReleasedUplicateClasses'。

1个例外是由工人提出的: java.lang.runtimeException:重复班级:Exoplayer核:2.17.0)和Jetified-exoplayer-ui-2.15.0-runtime.jar(com.google.android.exoplayer:exoplayer-ui:2.15.0)

:解决错误。

我不确定原因是,谷歌搜索但找不到解决方案。请帮我。 谢谢。

  1. 我尝试了“颤抖的清洁”和“扑打pubcache清洁” “扑面酒吧得到” “颤抖” 但这对我没有帮助。

  2. 我检查了gradle.properties文件,有 android.useandroidx = true android.enableJetifier = true

谁可以帮助我构建它而不会出错?

pubspec.yaml文件

环境: SDK:“> = 2.11.0< 3.0.0”

依赖项: 扑: SDK:Flutter

Flutter_svg: ^0.23.0+1 youtube_player_flutter: ^8.0.0 Smooth_star_rating:1.1.1

Assets_audio_player: ^3.0.4+1

Http: ^0.13.4

Firebase_Auth: ^3.3.12

Firebase_core: ^1.14.0 Cloud_firestore: ^3.1.10

Flutter_html: ^2.2.1 url_launcher: ^6.0.20 连接: ^3.0.6 share_plus: ^4.0.3 Fluttertoast: ^8.0.9

I got this error when "flutter run" command.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkReleaseDuplicateClasses'.

1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.google.android.exoplayer2.ui.DownloadNotificationHelper found in modules jetified-exoplayer-core-2.17.0-runtime.jar (com.google.android.exoplayer:exoplayer-core:2.17.0) and jetified-exoplayer-ui-2.15.0-runtime.jar (com.google.android.exoplayer:exoplayer-ui:2.15.0)

Go to the documentation to learn how to Fix dependency resolution errors.

I am not sure the reason, googled but can't find the solution. please help me.
Thanks.

  1. I tried "flutter clean" and "flutter pubcache clean"
    "flutter pub get"
    "flutter run"
    but it didn't help me.

  2. I checked gradle.properties file, there are
    android.useAndroidX=true
    android.enableJetifier=true

Who could help me to build this without error?

pubspec.yaml file

environment:
sdk: ">=2.11.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

flutter_svg: ^0.23.0+1
youtube_player_flutter: ^8.0.0
smooth_star_rating: 1.1.1

assets_audio_player: ^3.0.4+1

http: ^0.13.4

firebase_auth: ^3.3.12

firebase_core: ^1.14.0
cloud_firestore: ^3.1.10

flutter_html: ^2.2.1
url_launcher: ^6.0.20
connectivity: ^3.0.6
share_plus: ^4.0.3
fluttertoast: ^8.0.9

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文