0

任何人都知道如何为 linux arm/arm64 构建 frontend_server.dart.snapshot 吗?

源代码https://github.com/flutter/engine/tree/master/flutter_frontend_server

颤振引擎版 v1.20.1

dart-sdk 版本

Dart SDK version: 2.9.0 (stable) (Fri Jul 31 10:59:48 2020 +0200) on "linux_x64"

我想这样做?

/workspace/engine/src/flutter/flutter_frontend_server$ /workspace/dart-sdk/bin/dart --snapshot-kind=kernel --snapshot=frontend_server.dart.snapshot --packages=.packages   bin/starter.dart 

下面的错误

../../third_party/dart/third_party/pkg/collection/lib/src/algorithms.dart:20:24: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
    {int Function(T, T)? compare}) {
                       ^
../../third_party/dart/third_party/pkg/collection/lib/src/algorithms.dart:50:67: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
int lowerBound<T>(List<T> sortedList, T value, {int Function(T, T)? compare}) {
                                                                  ^
../../third_party/dart/third_party/pkg/collection/lib/src/algorithms.dart:70:44: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
void shuffle(List list, [int start = 0, int? end]) {
                                           ^
../../third_party/dart/third_party/pkg/collection/lib/src/algorithms.dart:84:44: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
void reverse(List list, [int start = 0, int? end]) {
                                           ^
../../third_party/dart/third_party/pkg/collection/lib/src/algorithms.dart:115:24: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
    {int Function(T, T)? compare, int start = 0, int? end}) {
                       ^
../../third_party/dart/third_party/pkg/collection/lib/src/algorithms.dart:115:53: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
    {int Function(T, T)? compare, int start = 0, int? end}) {
                                                    ^
../../third_party/dart/third_party/pkg/collection/lib/src/algorithms.dart:159:24: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
    {int start = 0, int? end, int Function(T, T)? compare}) {
                       ^
../../third_party/dart/third_party/pkg/collection/lib/src/algorithms.dart:159:49: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
    {int start = 0, int? end, int Function(T, T)? compare}) {
                                                ^
../../third_party/dart/third_party/pkg/collection/lib/src/canonicalized_map.dart:18:25: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
  final bool Function(K)? _isValidKeyFn;
                        ^
../../third_party/dart/third_party/pkg/collection/lib/src/canonicalized_map.dart:31:28: Error: Null safety features are disabled for this library.
Try removing the `@dart=` annotation or setting the language version higher.
      {bool Function(K key)? isValidKey})

期待!谢谢。

4

1 回答 1

0

空安全功能是一项重大更改。我通过将 git reset 设置为早期版本来解决此问题。示例:将 src/third_party/dart/third_party/pkg/collection 更改为标签 1.14.13 git reset 00540dce43a9bc778bfa55935a182799ff00044d 记得做git checkout所有修改过的文件。

于 2020-08-28T07:17:05.077 回答