Closed nyiyui closed 2 years ago
Thanks for the report, that might be a deprecation in 2.2.2, I'll have a look.
Very odd, I just did a build for 2.2.2 on iOS and it worked. However, I can see from here https://flutter.dev/docs/release/breaking-changes/mock-platform-channels that this method is gone, so I kind of understand why it's failing for you, but not why it's working for me. There does appear to be a migration strategy though so I'll work through and see if I can get a build that works for both of us.
Interesting, been trying to follow the migration guide and it doesn't work. Looks like this change doesn't happen until 2.3.0-17.0.pre.1
so some of the tools I'd need to migrate with aren't in 2.2.2. You're currently using the stable channel with 2.2.2?
Yes, I'm using Flutter version 2.2.2 on stable.
I've committed a change to the repo that moves the setMock into the test case. Can someone who can reproduce this try it out and let me know if it resolves the issue?
@sowens-csd worked here
Have the same issue when building Android APK on Flutter Beta 2.3.0-24.1.pre.
PR #232 fixed the issue. Successful build and the plugin is functioning. Thank you very much!
I'm getting that error with Flutter 2.4.0-1.0.pre.115 • channel master •
You guys should add this to your pubspec until @sowens-csd release a new version:
dependency_overrides:
speech_to_text_platform_interface:
git:
url: https://github.com/csdcorp/speech_to_text
path: speech_to_text_platform_interface
Thank you very much. That worked!
Facing the same issue with audio_service: ^0.17.1 package. None of the above solutions have worked.
error is
`/B:/flutter/.pub-cache/hosted/pub.dartlang.org/audio_service-0.17.1/lib/audio_service.dart:675:16: Error: The method 'setMockMethodCallHandler' isn't defined for the class 'MethodChannel'.
/B:/flutter/.pub-cache/hosted/pub.dartlang.org/audio_service-0.17.1/lib/audio_service.dart:1267:12: Error: The method 'setMockMethodCallHandler' isn't defined for the class 'MethodChannel'.
I'm also facing the same issue as @Yannick-DonOne
I'm also facing the same issue as @Yannick-DonOne
It looks like this issue is solved at the new prerelease version 0.18.0-beta.0
Flutter Version: 2.2.2
speech_to_text
Version:v4.2.1
When building for iOS, the build fails with the following error: