Duplicate class androidx.work.OneTimeWorkRequestKt found in modules work-runtime-2.8.1-runtime (androidx.work:work-runtime:2.8.1) and work-runtime-ktx-2.7.1-runtime (androidx.work:work-runtime-ktx:2.7.1) #299
Labels
bug
Something isn't working
What happened?
I noticed that if I use
home_widget: ^0.7.0
withworkmanager: ^0.5.2
it will give a duplicate class exception during build, removinghome_widget: ^0.7.0
resolves this issue.My dependencies:
It seems that at the
home_widget
example, there is aimplementation "androidx.work:work-runtime-ktx:2.8.1"
inbuild.gradle
.After I added the same implementation, the build finally passed. I think the README should be updated to inform that the user should implement the same work-runtime-ktx as in the example? Or is it possible to fix home_widget so that the user don't have to determine the version?
How to reproduce:
Remove
implementation "androidx.work:work-runtime-ktx:2.8.1"
from examplebuild.gradle
What do you expect?
Build to complete
Relevant log output
Execute in a terminal and put output into the code block below
[✓] Flutter (Channel stable, 3.24.3, on macOS 13.6.7 22G720 darwin-arm64, locale en-FI)
• Flutter version 3.24.3 on channel stable at /Users/xxxx/fvm/versions/3.24.3
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (2 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/xxxx/Library/Android/sdk
• Platform android-34-ext11, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
[✓] VS Code (version 1.93.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.96.0
[✓] Connected device (4 available)
• 2109119DG (mobile) • 40a26781 • android-arm64 • Android 14 (API 34)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.6.7 22G720 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 13.6.7 22G720 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 129.0.6668.70
[✓] Network resources
• All expected network resources are available.
• No issues found!
On which Platform do you experience this issue?
Android
Other information
Add
implementation "androidx.work:work-runtime-ktx:2.8.1"
tobuild.gradle
dependencies and it will build again. I hope it doesn't have any side-effects for other packages.Are you interested in working on a PR for this?
The text was updated successfully, but these errors were encountered: