firebase / flutterfire

πŸ”₯ A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.71k stars 3.97k forks source link

πŸ› [firebase_ml_vision: ^0.10.0] Duplicate class conflict #4936

Closed Teutonic-Knight-0 closed 3 years ago

Teutonic-Knight-0 commented 3 years ago

After updating to firebase_ml_vision: ^0.10.0 app won't build and says: Duplicate class com.google.android.gms.internal.vision.zzfe found in modules jetified-play-services-vision-common-19.1.3-runtime (com.google.android.gms:play-services-vision-common:19.1.3) and jetified-play-services-vision-image-labeling-internal-16.0.5-runtime (com.google.android.gms:play-services-vision-image-labeling-internal:16.0.5)


Additional context

FAILURE: Build failed with an exception.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel beta, 1.25.0-8.3.pre, on Microsoft Windows [Version 10.0.19042.746], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [√] Android Studio (version 4.1.0) [√] IntelliJ IDEA Community Edition (version 2020.3) [√] VS Code, 32-bit edition (version 1.52.0) [√] Connected device (1 available) β€’ No issues found! ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` Dart SDK 2.12.0-133.7.beta Flutter SDK 1.25.0-8.3.pre trigger 0.0.2+28 dependencies: - audioplayers 0.17.3 [uuid path_provider flutter flutter_web_plugins] - auto_size_text 2.1.0 [flutter] - camera 0.6.4+5 [flutter camera_platform_interface pedantic] - circular_countdown_timer 0.0.9 [flutter] - clay_containers 0.2.3 [flutter] - cloud_firestore 0.16.0 [flutter meta quiver firebase_core firebase_core_platform_interface cloud_firestore_platform_interface cloud_firestore_web] - convex_bottom_bar 2.6.0 [flutter] - dio 3.0.10 [http_parser path] - dots_indicator 1.2.0 [flutter] - extended_image 1.5.0 [flutter extended_image_library meta] - firebase_analytics 7.0.1 [meta flutter firebase_core firebase_analytics_web firebase_analytics_platform_interface] - firebase_auth 0.20.0+1 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter] - firebase_core 0.7.0 [firebase_core_platform_interface flutter quiver meta firebase_core_web] - firebase_messaging 8.0.0-dev.14 [meta flutter firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web] - firebase_ml_vision 0.10.0 [flutter] - firebase_storage 7.0.0 [flutter firebase_core firebase_core_platform_interface firebase_storage_web firebase_storage_platform_interface quiver] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_google_places 0.2.6 [flutter rxdart google_maps_webservice http] - flutter_icons 1.1.0 [flutter] - flutter_image_compress 0.7.0 [flutter] - flutter_local_notifications 4.0.0 [flutter flutter_local_notifications_platform_interface platform timezone] - flutter_neumorphic 3.0.3 [flutter] - flutter_rounded_date_picker 1.0.5+1 [flutter] - flutter_svg 0.19.2+1 [flutter meta path_drawing vector_math xml] - flutter_webview_plugin 0.3.11 [flutter] - font_awesome_flutter 8.11.0 [flutter] - geocoding 1.0.5 [flutter geocoding_platform_interface url_launcher] - geojson 0.9.1 [pedantic extra_pedantic meta geopoint iso geodesy] - geolocator 6.1.14 [flutter geolocator_platform_interface] - google_maps_flutter 1.1.1 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface] - image_cropper 1.3.1 [flutter] - image_picker 0.6.7+22 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - intl 0.16.1 [path] - intro_slider 2.3.3 [flutter] - package_info 0.4.3+4 [flutter] - permission_handler 5.0.1+1 [flutter meta permission_handler_platform_interface] - pin_code_fields 6.1.0 [flutter] - shared_preferences 0.5.12+4 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows] - simple_speed_dial 0.1.2 [flutter] - sliding_up_panel 1.0.2 [flutter] - sp_user_repository 0.0.2 [flutter flutter_bloc equatable firebase_core firebase_auth cloud_firestore google_sign_in flutter_facebook_auth shared_preferences font_awesome_flutter sign _in_with_apple formz sp_utilities] - sp_utilities 0.0.1 [flutter package_info crypto http oauth2 html_unescape google_maps_flutter flutter_svg cloud_firestore intl dio] - timeline_tile 1.0.0 [flutter] - url_launcher 5.7.10 [flutter url_launcher_platform_interface url_launcher_web url_launcher_linux url_launcher_macos url_launcher_windows] - wakelock 0.2.1+1 [flutter meta wakelock_platform_interface wakelock_web] - webview_flutter 1.0.7 [flutter] dev dependencies: - flutter_launcher_icons 0.8.1 [image args yaml path] transitive dependencies: - ansicolor 1.1.1 - archive 2.0.13 [crypto args path] - args 1.6.0 - async 2.4.2 [collection] - bloc 6.1.1 [meta] - camera_platform_interface 1.5.0 [flutter meta plugin_platform_interface cross_file stream_transform] - characters 1.1.0-nullsafety.5 - charcode 1.1.3 - cloud_firestore_platform_interface 3.0.1 [flutter meta collection firebase_core plugin_platform_interface] - cloud_firestore_web 0.3.0+1 [flutter flutter_web_plugins http_parser meta firebase_core firebase_core_web cloud_firestore_platform_interface js] - collection 1.15.0-nullsafety.5 - console_log_handler 1.1.6 [logging intl ansicolor] - convert 2.1.1 [charcode typed_data] - cross_file 0.1.0 [flutter http meta] - crypto 2.1.5 [collection convert typed_data] - csslib 0.16.2 [source_span] - equatable 1.2.5 [collection meta] - extended_image_library 0.3.1 [flutter path_provider http_client_helper crypto path] - extra_pedantic 1.2.0 - ffi 0.1.3 - file 5.2.1 [intl meta path] - firebase 7.3.3 [http http_parser js] - firebase_analytics_platform_interface 1.0.3 [flutter meta] - firebase_analytics_web 0.1.1 [flutter flutter_web_plugins firebase firebase_analytics_platform_interface meta] - firebase_auth_platform_interface 3.0.1 [flutter meta firebase_core plugin_platform_interface] - firebase_auth_web 0.3.2+6 [flutter flutter_web_plugins meta http_parser intl firebase_core firebase_core_web firebase_auth_platform_interface js] - firebase_core_platform_interface 3.0.1 [flutter meta plugin_platform_interface quiver] - firebase_core_web 0.2.1+3 [firebase_core_platform_interface flutter flutter_web_plugins meta js] - firebase_messaging_platform_interface 1.0.0-dev.10 [flutter meta firebase_core plugin_platform_interface] - firebase_messaging_web 0.1.0-dev.5 [flutter flutter_web_plugins meta firebase_core firebase_core_web firebase_messaging_platform_interface js service_worker] - firebase_storage_platform_interface 1.0.4 [flutter meta collection firebase_core plugin_platform_interface] - firebase_storage_web 0.1.1+3 [async crypto firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta] - flutter_bloc 6.1.1 [flutter bloc provider] - flutter_facebook_auth 2.0.1 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web] - flutter_facebook_auth_platform_interface 1.0.1 [flutter plugin_platform_interface] - flutter_facebook_auth_web 1.0.6 [flutter flutter_web_plugins js] - flutter_local_notifications_platform_interface 2.0.0+1 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 1.0.11 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math] - formz 0.3.2 - geocoding_platform_interface 1.0.1+1 [flutter meta plugin_platform_interface] - geodesy 0.3.2 [latlong pedantic] - geolocator_platform_interface 1.0.8 [flutter meta plugin_platform_interface vector_math] - geopoint 0.7.1 [pedantic extra_pedantic meta latlong slugify2] - google_maps_flutter_platform_interface 1.1.0 [flutter meta plugin_platform_interface stream_transform collection] - google_maps_webservice 0.0.19 [http meta] - google_sign_in 4.5.9 [google_sign_in_platform_interface flutter meta google_sign_in_web] - google_sign_in_platform_interface 1.1.2 [flutter meta quiver] - google_sign_in_web 0.9.2 [google_sign_in_platform_interface flutter flutter_web_plugins meta js] - html 0.14.0+4 [csslib source_span] - html_unescape 1.0.2 - http 0.12.2 [http_parser path pedantic] - http_client_helper 0.2.1 [http] - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data] - image 2.1.19 [archive xml meta] - image_picker_platform_interface 1.1.1 [flutter meta http plugin_platform_interface] - import_js_library 1.0.2 [flutter html flutter_web_plugins js] - iso 0.3.0 [meta pedantic extra_pedantic] - js 0.6.3-nullsafety.3 - latlong 0.6.1 [logging console_log_handler validate intl] - logging 0.11.4 - matcher 0.12.9 [stack_trace] - meta 1.3.0-nullsafety.6 - nested 0.0.4 [flutter] - oauth2 1.6.3 [http http_parser crypto] - path 1.7.0 - path_drawing 0.4.1+1 [vector_math meta path_parsing flutter] - path_parsing 0.1.4 [vector_math meta] - path_provider 1.6.27 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 0.0.4+8 [flutter] - path_provider_platform_interface 1.0.4 [flutter meta platform plugin_platform_interface] - path_provider_windows 0.0.4+3 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.9.2 [meta] - permission_handler_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - petitparser 3.1.0 [meta] - platform 2.2.1 - plugin_platform_interface 1.0.3 [meta] - process 3.0.13 [file intl meta path platform] - provider 4.3.3 [collection flutter nested] - quiver 2.1.5 [matcher meta] - rxdart 0.24.1 - service_worker 0.2.4 [js] - shared_preferences_linux 0.0.2+4 [file flutter meta path path_provider_linux shared_preferences_platform_interface] - shared_preferences_macos 0.0.1+11 [shared_preferences_platform_interface flutter] - shared_preferences_platform_interface 1.0.4 [meta flutter] - shared_preferences_web 0.1.2+7 [shared_preferences_platform_interface flutter flutter_web_plugins meta] - shared_preferences_windows 0.0.2+2 [shared_preferences_platform_interface flutter ffi file meta path path_provider_platform_interface path_provider_windows] - sign_in_with_apple 2.5.4 [meta flutter] - sky_engine 0.0.99 - slugify2 0.2.1 - source_span 1.7.0 [charcode collection meta path term_glyph] - stack_trace 1.9.6 [path] - stream_transform 1.2.0 - string_scanner 1.0.5 [charcode meta source_span] - term_glyph 1.1.0 - timezone 0.6.1 [path] - typed_data 1.3.0-nullsafety.5 [collection] - url_launcher_linux 0.0.1+4 [flutter] - url_launcher_macos 0.0.1+9 [flutter] - url_launcher_platform_interface 1.0.9 [flutter meta plugin_platform_interface] - url_launcher_web 0.1.5+1 [url_launcher_platform_interface flutter flutter_web_plugins meta] - url_launcher_windows 0.0.1+3 [flutter] - uuid 2.2.2 [crypto convert] - validate 1.7.0 - vector_math 2.1.0-nullsafety.5 - wakelock_platform_interface 0.1.0+1 [flutter meta] - wakelock_web 0.1.0+3 [flutter flutter_web_plugins import_js_library js wakelock_platform_interface] - win32 1.7.4 [ffi] - xdg_directories 0.1.2 [meta path process] - xml 4.5.1 [collection convert meta petitparser] - yaml 2.2.1 [charcode collection string_scanner source_span] ```

Teutonic-Knight-0 commented 3 years ago

Solved

https://github.com/FirebaseExtended/flutterfire/issues/4141#issuecomment-738702407

android/app/build.gradle:

dependencies { implementation 'com.android.support:multidex:1.0.3' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.facebook.android:facebook-android-sdk:5.15.3' implementation 'com.google.firebase:firebase-analytics:18.0.2' implementation 'com.google.firebase:firebase-firestore:22.0.2' implementation 'com.google.guava:guava:27.0.1-android' implementation 'com.google.android.gms:play-services-vision:20.1.3' implementation 'com.google.firebase:firebase-ml-vision:24.1.0' implementation 'com.google.firebase:firebase-ml-vision-barcode-model:16.1.2' implementation 'com.google.android.gms:play-services-vision-common:19.1.3' implementation 'com.google.firebase:firebase-ml-vision-image-label-model:20.0.2' implementation 'com.google.android.gms:play-services-vision-image-labeling-internal:16.1.0' implementation 'com.google.firebase:firebase-ml-vision-face-model:20.0.2' implementation 'com.google.android.gms:play-services-vision-face-contour-internal:16.1.0' implementation 'com.google.android.gms:play-services-vision-image-label:18.1.1' }