Build failed with exception when the package is included in the project: just_audio 0.5.5
I posted the bug on flutter page also
https://github.com/flutter/flutter/issues/69236
This exception is reported on the link below, I tried most solutions on that page to no av
https://github.com/flutter/flutter/issues/49938
Failed solutions:
1- deleting build folder
2-
flutter channel stable
flutter upgrade --force
flutter pub cache repair
cd
flutter clean
3- Through android studio: File > Invalidate Caches/Restart...
To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules guava-26.0-android.jar (com.google.guava:guava:26.0-android) and listenablefuture-1.0.jar (com.google.guava:listenablefuture:1.0)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Flutter SDK version
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.2, on Microsoft Windows [Version 10.0.18363.1139], locale en-CA)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[√] Android Studio (version 3.6)
[√] VS Code (version 1.50.1)
[√] Connected device (1 available)
• No issues found!
Oops, it appears that your issue did not follow the template and is missing one or more required sections. Please open a new issue, and provide all required sections and information.
FAQ:
Do I really need to submit a minimal reproduction project for a bug? A: Yes. I prioritise bugs _secondarily_ on how many people are affected, and _primarily_ on whether the bug report is complete, in the sense that it enables me to immediately reproduce it and start working on a fix. If a bug is important to you, the best thing you can do is to provide all requested information ASAP so that I can start looking into it ASAP.
I think I supplied all required information, so did the bot make a mistake? A: The bot only checks the section headings, so when you post a new issue, make sure you leave the section headings intact. (Note that because of this, it is even possible to trick the bot by including only the section headings, and then not providing the requested information under each heading. This is frowned upon, and the issue will be closed manually.)
If you are still struggling with the issue try adding
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
inside dependencies in your android>app>build.gradle file. It worked for me.
@ayyshim thanks for contributing, and yes hopefully it helps others. I'd like to suggest this in the README, but first I want to reproduce the issue for myself so I'll wait for someone to post a complete bug report with a reproduction project.
@slimyTextBox if you're still reading, it would be a valuable contribution to the plugin if you could submit that. Simply "(adding) just_audio 0.5.5 package to yaml" is not enough to reproduce it because the example already does that and doesn't exhibit the bug, the bug is only present with certain combinations of dependencies which you haven't included in your reproduction information.