gpt4 book ai didi

android - 为什么我在 Flutter Run 后收到此错误?

转载 作者:行者123 更新时间:2023-12-05 00:01:58 26 4
gpt4 key购买 nike

运行我的 flutter 项目后,我收到以下构建失败并出现异常。

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.google.android.exoplayer2.ui.DownloadNotificationHelper found in modules jetified-exoplayer-core-2.17.0-runtime (com.google.android.exoplayer:exoplayer-core:2.17.0) and jetified-exoplayer-ui-2.15.1-runtime (com.google.android.exoplayer:exoplayer-ui:2.15.1)

Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3m 26s
Running Gradle task 'assembleDebug'... 208.9s
Exception: Gradle task assembleDebug failed with exit code 1
我目前正在使用 Flutter 的最新版本,即 2.10.1 版。同样在我的项目中,我使用了“better_player”发布包。
请给我一个解决方案。

最佳答案

在文件末尾的依赖项中的 app/build.gradle 中添加以下依赖项 -
实现 'com.google.android.exoplayer:exoplayer:2.17.0'
例子 -

dependencies {

...

implementation 'com.google.android.exoplayer:exoplayer:2.17.0'

}

关于android - 为什么我在 Flutter Run 后收到此错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71671942/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com