3

我正在尝试使用命令“flutter build web”在 ubuntu 机器上构建 Flutter Web 应用程序。构建因堆栈跟踪而失败。它发生在 Flutter 更新 2.8.1 之后

我已经在本地机器以及 azure VM 上尝试过它。我得到同样的错误。代码在 mac os 机器上成功构建。实际堆栈跟踪太大,无法在此处发布。

Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (4 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1
/snap/bin/flutter
/snap/bin/dart
Running "flutter pub get" in flutter_tools...                       6.6s
Running "flutter pub get" in s...                                  17.8s

 Building with sound null safety 

Compiling lib/main.dart for the Web...
Target dart2js failed: Exception: ../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/device_info_plus_windows-2.1.1/lib/src/device_info_plus_windows.dart:4:8:
Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-1.1.2/lib/src/allocation.dart:5:8:
Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-1.1.2/lib/src/arena.dart:8:8:
Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
../../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-1.1.2/lib/src/utf8.dart:6:8:
Error: Not found: 'dart:ffi'
import 'dart:ffi'; 

4

0 回答 0