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.<anonymous closure> (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)

参考ffigen文档 ,安装LLVM以及Visual Studio(主要是下载C++),然后在ffigen.yaml文件中配置LLVM路径

复制代码
llvm-path:
  - 'D:\LLVM'
相关推荐
ZZZMMM.zip1 小时前
基于鸿蒙PC与鸿蒙Flutter框架构建AI本地生活服务平台
人工智能·flutter·华为·harmonyos·鸿蒙
木叶丸2 小时前
AI 编程概念与 Harness 工程实践入门
人工智能·flutter·ios
程序员老刘17 小时前
腾讯混元Hy3在Flutter项目中的实战体验
flutter·ai编程
ailinghao18 小时前
flutter常用的内置特性
flutter
子非鱼942721 小时前
10-Flutter调用鸿蒙原生能力前置课:MethodChannel和PlatformView准备
学习·flutter·华为·harmonyos
xd1855785551 天前
鸿蒙PC时代的AI快递查询应用:基于鸿蒙Flutter框架的跨端创新实践
人工智能·flutter·华为·harmonyos·鸿蒙
ZZZMMM.zip1 天前
基于鸿蒙PC与鸿蒙Flutter框架的AI紧急求助应用开发实践
人工智能·flutter·华为·harmonyos·鸿蒙
ZZZMMM.zip1 天前
鸿蒙生态新征程:基于鸿蒙Flutter框架的AI菜谱营养应用深度解析
人工智能·flutter·华为·harmonyos·鸿蒙·鸿蒙系统
心中有国也有家1 天前
AtomGit Flutter 鸿蒙客户端: AnimatedScale 与 AnimatedContainer 联合实战
android·javascript·flutter·华为·harmonyos
brave7231 天前
Widget、Element、RenderObject 三棵树到底怎么协作?
flutter