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'
相关推荐
GitLqr1 小时前
Flutter FocusNode 实战指南:玩转键盘焦点与用户输入体验
android·flutter·ios
智玲君5 小时前
如何在Flutter中集成Firebase A/B Testing
flutter
末代iOS程序员华仔7 小时前
OPC + Flutter + Swift:跨平台应用上架与专业知识点获客实战指南
开发语言·flutter·swift
FungLeo7 小时前
Flutter/Android Release 包连不上网?AndroidManifest INTERNET 权限排查实录
android·flutter
GitLqr1 天前
深度拆解 Dart 事件循环:从面试题看清 Microtask 与 Event Queue 的执行顺序
flutter·面试·dart
吾儿良辰1 天前
Flutter 迎来重大变革:Material 设计系统拆分,迈向更开放的 UI 框架
javascript·flutter·ui
看昭奚恤哭1 天前
Flutter 布局核心思想
开发语言·javascript·flutter
末代iOS程序员华仔1 天前
iOS上架海外工具类应用合规指南:避免封号与下架风险
flutter·ios·swift
末代iOS程序员华仔1 天前
Flutter 开发 iOS App 上架全流程与常见问题分析
flutter·ios
末代iOS程序员华仔1 天前
Flutter开发iOS海外工具类应用上架合规指南与风险规避
flutter·ios