1

I think I'm having the issue described in [this][1] forum. I recently added the shake package to my Flutter app. Although it was working fine the first couple times I ran it, now it does not start most of the time because it throws this MissingPluginException:

'No implementation found for method setAccelerationSamplingPeriod on channel dev.fluttercommunity.plus/sensors/method'

When I add the dependency on sensors_plus ^4.0.2 as suggested in the forum, I get this error:

Because shake 2.2.0 depends on sensors_plus ^1.4.1 and no versions of shake match >2.2.0 <3.0.0, shake ^2.2.0 requires sensors_plus ^1.4.1.
So, because dice depends on both shake ^2.2.0 and sensors_plus ^4.0.2, version solving failed.


You can try one of the following suggestions to make the pubspec resolve:
* Consider downgrading your constraint on shake: flutter pub add shake:^1.0.1
* Consider downgrading your constraint on sensors_plus: flutter pub add sensors_plus:^1.4.1

A later post in the forum recommends using dependency_overrides to satisfy the errors.

Any thoughts on the best way to tackle this issue?

Thanks! Anson [1]: https://github.com/fluttercommunity/plus_plugins/issues/2471

1
  • For now I just downgraded the shake package and it seems to be playing a bit nicer, but I'd love to discuss how to do this better in the future. Commented Jan 12, 2024 at 18:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.