{
  "id": "flutter/dart-ffi-missing-library",
  "signature": "Invalid argument(s): Failed to load dynamic library 'libmy_native.so': dlopen failed: library not found",
  "signature_zh": "Invalid argument(s): 加载动态库 'libmy_native.so' 失败：dlopen 失败：找不到库",
  "regex": "Invalid argument\\(s\\): Failed to load dynamic library '.*': dlopen failed: library .* not found",
  "domain": "flutter",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "The native library (.so file) is not bundled with the app or not placed in the correct ABI directory.",
  "root_cause_type": "generic",
  "root_cause_zh": "本机库（.so 文件）未与应用捆绑或未放置在正确的 ABI 目录中。",
  "versions": [
    {
      "version": "3.13.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.16.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.22.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Flutter's Gradle build does not automatically include libs/ unless jniLibs sourceSets are configured.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Android will not load the library if the ABI does not match the device's architecture.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Prevents extraction of native libs from APK; library file remains inaccessible at runtime.",
      "fail_rate": 0.2,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Place the .so files in the correct jniLibs directory structure (e.g., android/app/src/main/jniLibs/arm64-v8a/).",
      "success_rate": 0.85,
      "how": "Place the .so files in the correct jniLibs directory structure (e.g., android/app/src/main/jniLibs/arm64-v8a/).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the flutter_ffi plugin's built-in bundling mechanism by declaring the library in pubspec.yaml under 'ffi_native_libraries'.",
      "success_rate": 0.9,
      "how": "Use the flutter_ffi plugin's built-in bundling mechanism by declaring the library in pubspec.yaml under 'ffi_native_libraries'.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Configure Gradle to include the library by adding jniLibs sourceSets in android/app/build.gradle.",
      "success_rate": 0.8,
      "how": "Configure Gradle to include the library by adding jniLibs sourceSets in android/app/build.gradle.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Place the .so files in the correct jniLibs directory structure (e.g., android/app/src/main/jniLibs/arm64-v8a/).",
    "Use the flutter_ffi plugin's built-in bundling mechanism by declaring the library in pubspec.yaml under 'ffi_native_libraries'.",
    "Configure Gradle to include the library by adding jniLibs sourceSets in android/app/build.gradle."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://api.flutter.dev/flutter/dart-ffi/dart-ffi-library.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}