record
record copied to clipboard
The version >= 5.0.0 of the package encounters an error when the package on_audio_query: ^2.9.0 is present.
Package version record: ^5.0.0-5.0.5
Environment
- OS: [e.g. Android]
Describe the bug
The package record version 5.0.0 and above conflicts with on_audio_query: ^2.9.0.
To Reproduce
The application that I'm building is the built-in counter app. There is no import of any packages. I tried adding dependencies in the pubspec.yaml file as follows:
record: ^5.0.0
just_audio: ^0.9.37
path_provider: ^2.1.2
on_audio_query: ^2.9.0
However, the build failed.
Expected behavior
if I add dependencies as follows:
record: ^4.4.4
just_audio: ^0.9.37
path_provider: ^2.1.2
on_audio_query: ^2.9.0
the build succeeds and runs smoothly.
Additional context
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 androidx.lifecycle.ViewModelLazy found in modules jetified-lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1) and lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1)
Duplicate class androidx.lifecycle.ViewTreeViewModelKt found in modules jetified-lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1) and lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.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 1m 17s