Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The version >= 5.0.0 of the package encounters an error when the package on_audio_query: ^2.9.0 is present. #300

Closed
IwanPWK opened this issue Apr 3, 2024 · 1 comment

Comments

@IwanPWK
Copy link

IwanPWK commented Apr 3, 2024

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
@llfbandit
Copy link
Owner

androidx.lifecycle:lifecycle-viewmodel-ktx is not a dependency of this package.
You should ask to on_audio_query maintainer to upgrade the Android setup. Also, there's the same issue there.

Closing this as nothing has to be done here.

@llfbandit llfbandit closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants