简体   繁体   English

我在运行我的 flutter 应用程序时发现了 gradle 这个错误

[英]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.

相关问题 Flutter:无法在模拟器上运行应用程序 - gradle 错误 - Flutter: Not able to run the app on simulator - gradle error 当我运行代码 gradle 任务需要太长时间时,我的 flutter 应用程序出现问题 我尝试了 flutter 医生,它说一切都正确,然后错误 - i have problem with my flutter app when i run the code gradle task takes too long i tried flutter doctor ,it says that all things is right ,then error 我无法在模拟器上运行我的应用程序,并且在logcats上发现错误 - I can't run my app on emulator and found error on logcats 当我尝试在 android studio 上运行我的颤振应用程序时,请一直收到此错误 - Please I keep getting this error when I try to run my flutter app on android studio 每次运行应用程序时都会出现 gradle 错误 - I have an gradle error everytime I run the app 无法运行 Flutter 应用程序 - 不支持的 gradle 项目 - Unable to run Flutter app - Unsupported gradle project 当我想运行我的颤振/飞镖应用程序时,它给了我很多错误 - when i want to run my flutter/dart app it give me tons of error flutter:第一次运行我的 flutter 应用程序时出现 gradle 错误 - flutter: getting gradle error while running my flutter app for the first time 尝试运行时我的第一个 flutter 应用程序出错 - Getting error in my first flutter app while trying to run 当我尝试运行时,我的 Flutter 应用程序没有出现在模拟器中 - My Flutter app doesnt appear in the emulator when I try to run it
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM