lcuis / search_choices

Widget to let the user search through a keyword string typed on a customizable keyboard in a single or multiple choices list presented as a dropdown in a dialog box or a menu.
MIT License
49 stars 40 forks source link

Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found #122

Open ibrahimsebbane opened 8 months ago

ibrahimsebbane commented 8 months ago

The package seems to have conflicts in classes. The application doesn't run and the error is as below:

Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.22 (org.jetbrains.kotlin:kotlin-stdlib:1.8.22) and jetified-kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10).....

I've upgraded Flutter but it doesn't help Flutter doctor: PS C:\Users\Ibrahim\Documents pc\personal_projects\medigo> flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.16.5, on Microsoft Windows [version 10.0.22621.2861], locale fr-FR) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.9) [√] Android Studio (version 2020.3) [√] VS Code (version 1.85.1) [√] Connected device (4 available) [√] Network resources

• No issues found! PS C:\Users\Ibrahim\Documents pc\personal_projects\medigo>

lcuis commented 8 months ago

Hi @ibrahimsebbane ,

Thanks for reporting this. I will not have time to look into this right now. It is surprising that you get this issue because the automated compilation and non regression testing ran like a charm. If I had time, I would start with some attempts around what is suggested at this link: https://stackoverflow.com/questions/75263047/duplicate-class-in-kotlin-android

PabloCir commented 1 month ago

for now, you can fix this, just put this code in your (app) build.gradle, under "dependencies" `dependencies { implementation platform("com.google.firebase:firebase-bom:32.7.1") //others dependencies }

allprojects { configurations.all { resolutionStrategy { force 'org.jetbrains.kotlin:kotlin-stdlib:1.8.22' force 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22' } } }`