{
  "id": "flutter/platformexception-no-such-method",
  "signature": "PlatformException: no_such_method, The method 'X' was not found on channel Y",
  "signature_zh": "PlatformException：no_such_method，在通道 Y 上未找到方法 'X'",
  "regex": "PlatformException: no_such_method, The method '.*' was not found on channel '.*'",
  "domain": "flutter",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The Flutter plugin for the platform side does not implement the requested method, often due to missing plugin registration or version mismatch.",
  "root_cause_type": "generic",
  "root_cause_zh": "Flutter 插件的平台端未实现请求的方法，通常是由于缺少插件注册或版本不匹配。",
  "versions": [
    {
      "version": "Flutter 3.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Flutter 3.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Flutter 3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Adding the missing method to the Dart side without updating the native code",
      "why_fails": "The method must be implemented in both Dart and native (Android/iOS/Web) for the channel to work.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "Restarting the Flutter app without cleaning the build cache",
      "why_fails": "If the native code wasn't rebuilt, the plugin classes remain unchanged.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Assuming the plugin is automatically registered without checking MainActivity or AppDelegate",
      "why_fails": "Some plugins require manual registration in the native entry point, especially custom or older plugins.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure the native method is implemented and registered. For Android, check that the plugin is registered in MainActivity's configureFlutterEngine:\n@Override\npublic void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {\n  GeneratedPluginRegistrant.registerWith(flutterEngine);\n  flutterEngine.getPlatformChannelController().setMethodCallHandler(new MyMethodCallHandler());\n}",
      "success_rate": 0.95,
      "how": "Ensure the native method is implemented and registered. For Android, check that the plugin is registered in MainActivity's configureFlutterEngine:\n@Override\npublic void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {\n  GeneratedPluginRegistrant.registerWith(flutterEngine);\n  flutterEngine.getPlatformChannelController().setMethodCallHandler(new MyMethodCallHandler());\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "Run 'flutter clean' and rebuild the app to force recompilation of native code and plugin registration:\nflutter clean\nflutter run",
      "success_rate": 0.8,
      "how": "Run 'flutter clean' and rebuild the app to force recompilation of native code and plugin registration:\nflutter clean\nflutter run",
      "condition": "",
      "sources": []
    },
    {
      "action": "Verify the method name spelling and case sensitivity; platform channels are case-sensitive.",
      "success_rate": 0.7,
      "how": "Verify the method name spelling and case sensitivity; platform channels are case-sensitive.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure the native method is implemented and registered. For Android, check that the plugin is registered in MainActivity's configureFlutterEngine:\n@Override\npublic void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {\n  GeneratedPluginRegistrant.registerWith(flutterEngine);\n  flutterEngine.getPlatformChannelController().setMethodCallHandler(new MyMethodCallHandler());\n}",
    "Run 'flutter clean' and rebuild the app to force recompilation of native code and plugin registration:\nflutter clean\nflutter run",
    "Verify the method name spelling and case sensitivity; platform channels are case-sensitive."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.flutter.dev/development/platform-integration/platform-channels",
  "official_doc_section": null,
  "error_code": "no_such_method",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-04-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}