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'
相关推荐
程序员老刘4 小时前
跨平台开发地图:客户端技术选型指南 | 2025年12月
flutter·客户端
一名普通的程序员5 小时前
使用 Flutter Pay 插件实现 Apple Pay 和 Google Pay 的完整指南
flutter
麦客奥德彪6 小时前
Flutter riverpod 对应Android开发概念理解
flutter
tangweiguo030519876 小时前
Kotlin vs Dart vs Swift:语法对比全解
flutter
feelingHy7 小时前
GetX 状态管理实践
flutter
tangweiguo030519878 小时前
Flutter多品牌应用架构实战:从配置驱动到编译部署的完整解决方案
flutter
Bryce李小白8 小时前
FlutterBoost适配Flutter3.38.4版本生成补丁包
flutter
tangweiguo030519879 小时前
Flutter Packages 设计与实践:构建可维护的模块化应用
flutter
小a杰.9 小时前
Flutter 的编译技术核心
flutter
hudawei99611 小时前
flutter setState(() { … }) 作用
flutter