[英]I found this error with gradle on run my flutter app
That is the error when i run my app i need some help这是我运行我的应用程序时的错误,我需要一些帮助
i add liberary我添加了图书馆
just_audio:0:9:31 just_audio:0:9:31
and i found this error and didn't run我发现了这个错误并且没有运行
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.18.1-runtime (com.google.android.exoplayer:exoplayer-core:2.18.1) and jetified-exoplayer-ui-2.11.1-runtime (com.google.android.exoplayer:exoplayer-ui:2.11.1)
Duplicate class com.google.android.exoplayer2.ui.package-info found in modules jetified-exoplayer-common-2.18.1-runtime (com.google.android.exoplayer:exoplayer-common:2.18.1) and jetified-exoplayer-ui-2.11.1-runtime (com.google.android.exoplayer:exoplayer-ui:2.11.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 15s
Exception: Gradle task assembleDebug failed with exit code 1```
i expect to find some advice to solve it
in your android/app/build.gradle
, try adding those dependencies:在你的
android/app/build.gradle
中,尝试添加这些依赖项:
dependencies {
// ...
def exoplayer_version = "2.18.1" // this is the version
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-smoothstreaming:$exoplayer_version"
}
save and re build your app.保存并重新构建您的应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.