fluttercommunity / flutter_workmanager

A Flutter plugin which allows you to execute code in the background on Android and iOS.
851 stars 260 forks source link

# PlatformException(unhandledMethod("registerOneOffTask") error, Unhandled method registerOneOffTask, null, null) #477

Closed jsshizhan closed 1 year ago

jsshizhan commented 1 year ago

Version

Technology Version
Workmanager version 3.5.0
Xcode version 14.3
Swift version 5.8
iOS deployment target 10.0

Describe the error PlatformException(unhandledMethod("registerOneOffTask") error, Unhandled method registerOneOffTask, null, null) StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607) MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167)

Workmanager.registerOneOffTask (package:workmanager/src/workmanager.dart:187) **Output of `flutter doctor -v`** Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.0.5, on macOS 13.4 22F66 darwin-x64, locale zh-Hans-CN) [!] Android toolchain - develop for Android devices (Android SDK version 33.0.0) ✗ cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [✓] Xcode - develop for iOS and macOS (Xcode 14.3) [✓] Chrome - develop for the web [!] Android Studio (not installed) [✓] IntelliJ IDEA Community Edition (version 2022.2) [✓] VS Code (version 1.78.2) [✓] Connected device (2 available) [✓] HTTP Host Availability ! Doctor found issues in 2 categories. i tried example , and get the same error
ened commented 1 year ago

Please try using the latest versions.