Flutter异常Couldn‘t find dynamic library in default locations

Flutter项目在Windows系统使用ffigen生成代码时报下面的错误:

SEVERE\] : Couldn't find dynamic library in default locations. \[SEVERE\] : Please supply one or more path/to/llvm in ffigen's config under the key 'llvm-path'. Unhandled exception: Exception: Couldn't find dynamic library in default locations. #0 findDylibAtDefaultLocations (package:ffigen/src/config_provider/spec_utils.dart:371:3) #1 Config._getRootConfigSpec.\ (package:ffigen/src/config_provider/config.dart:231:35) #2 HeterogeneousMapConfigSpec._extractNode (package:ffigen/src/config_provider/config_spec.dart:320:16) #3 ConfigSpec.extract (package:ffigen/src/config_provider/config_spec.dart:86:12) #4 new Config.fromYaml (package:ffigen/src/config_provider/config.dart:192:22) #5 new Config.fromFile (package:ffigen/src/config_provider/config.dart:201:19) #6 getConfigFromCustomYaml (package:ffigen/src/executables/ffigen.dart:126:17) #7 getConfig (package:ffigen/src/executables/ffigen.dart:78:14) #8 main (package:ffigen/src/executables/ffigen.dart:48:14)

复制代码
llvm-path:
  - 'D:\LLVM'
相关推荐
●VON6 小时前
Flutter 项目成功运行后,如何正确迁移到 OpenHarmony?常见疑问与跳转失效问题解析
flutter·华为·openharmony·开源鸿蒙
●VON6 小时前
Flutter 编译开发 OpenHarmony 全流程实战教程(基于 GitCode 社区项目)
flutter·openharmony·gitcode
消失的旧时光-194318 小时前
Flutter 组件:Row / Column
flutter
程序员老刘21 小时前
Flutter版本选择指南:3.35稳定,3.38发布 | 2025年11月
flutter·客户端
kirk_wang1 天前
Flutter 3.38和Dart 3.10中最大的更新
flutter
前端小伙计1 天前
Flutter 配置国内镜像,加速项目加载!
flutter
zonda的地盘1 天前
开发 Flutter Plugin 之 初始配置
flutter
消失的旧时光-19432 天前
Flutter TextField 从入门到精通:掌握输入框的完整指南
flutter
wordbaby2 天前
Flutter Form Builder 完全指南:告别 Controller 地狱
前端·flutter
tbit2 天前
fluwx 拉起小程序WXLog:Error:fail to load Keychain status:-25300, keyData null:1
flutter·ios·微信小程序