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

Newer version has some multiple import variable issue with latest version of flutter #58

Open
navneetdhameliya opened this issue Mar 1, 2024 · 10 comments · May be fixed by #64
Open

Newer version has some multiple import variable issue with latest version of flutter #58

navneetdhameliya opened this issue Mar 1, 2024 · 10 comments · May be fixed by #64

Comments

@navneetdhameliya
Copy link

navneetdhameliya commented Mar 1, 2024

Screenshot 2024-03-01 at 3 40 07 PM

When I update my flutter version and run application this issue come

@derdmislav
Copy link

We are also experiencing the same problem.
google_maps_flutter_platform_interface 2.6.0 brought in changes and because google_maps_cluster_manager takes the newest 2.x.x version of google_maps_flutter_platform_interface dependency the issue is created.

Quickest fix would be to add google_maps_flutter_platform_interface in your project as direct dependency and set it to 2.4.3 version

@BrijalKothari
Copy link

I got the same issue with both version 3.1.0 and 3.0.0+1. Can you provide a solution?

@RoarGronmo
Copy link

The pub-score dropped by 50 because of this issue.
Should be fixed as soon as possible.

@RoarGronmo
Copy link

I got the same issue with both version 3.1.0 and 3.0.0+1. Can you provide a solution?

As @derdmislav said above:

Pin it in your pubspec.yaml file until resolved

  #---Google maps
  google_maps_flutter: ^2.1.12
  google_maps_flutter_web: ^0.5.0+1
  google_maps_cluster_manager: ^3.0.0+1
  
  google_maps_flutter_platform_interface: 2.4.3        #<-- set the version without '^'
  
  google_static_maps_controller: ^1.0.0
  flutter_google_street_view: ^3.0.0
  pointer_interceptor: ^0.10.0
  maps_toolkit: ^3.0.0

@BrijalKothari
Copy link

BrijalKothari commented Mar 4, 2024

Thanks, it's working@RoarGronmo

MacDeveloper1 added a commit to MacDeveloper1/google_maps_cluster_manager that referenced this issue Mar 4, 2024
@RoarGronmo
Copy link

Reason seem to be related to this / theese new functions in google_maps_flutter:
flutter/packages#6158
They are adding functions to have clustering "out of the box" in google_maps_flutter.

@FaisalMohammadi
Copy link

FaisalMohammadi commented Mar 12, 2024

i get this error as well since i updated my flutter to the latest 3.19.3
and i added the package as @RoarGronmo mentioned but still didnt work.

@RoarGronmo
Copy link

Did you remember to "pin" the version ?

--Omit the '^' sign in the version.

@RoarGronmo
Copy link

i get this error as well since i updated my flutter to the latest 3.19.3 and i added the package as @RoarGronmo mentioned but still didnt work.

You may have set the version of google_maps_cluster_manager library to ^3.1.0

It is breaking because google_maps_cluster_manager: ^3.1.0 is dependent on: 2.4.3 of google_maps_flutter_platform_interface.

Error when pinning 2.4.1 on google_maps_flutter_platform_interface and setting ^3.1.0 on google_maps_cluster_manager when running flutter pub get:

Because m_office depends on google_maps_cluster_manager ^3.1.0 which depends on google_maps_flutter_platform_interface ^2.4.3, google_maps_flutter_platform_interface ^2.4.3 is required.
So, because m_office depends on google_maps_flutter_platform_interface 2.4.1, version solving failed.


You can try one of the following suggestions to make the pubspec resolve:
* Try upgrading your constraint on google_maps_flutter_platform_interface: flutter pub add google_maps_flutter_platform_interface:^2.6.0
* Consider downgrading your constraint on google_maps_cluster_manager: flutter pub add google_maps_cluster_manager:'^3.0.0+1'

Even the solution suggests to rise the google_maps_flutter_platform_interface to ^2.6.0 it may resolve, but it will fail during build...:Error: 'Cluster' is imported from both 'package:google_maps_cluster_manager/src/cluster.dart' and 'package:google_maps_flutter_platform_interface/src/types/cluster.dart'.

So pin your google_maps_flutter_platform_interface to 2.4.1 and set your google_maps_cluster_manager to ^3.0.0+1 to let it compile. Anyway, you may be victim of "dependency hog" until resolved then...

@RoarGronmo
Copy link

Just adding this comment

#59 (comment)

for a swifter intermediate solution

@vincendep vincendep linked a pull request Apr 17, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

5 participants