目标 Kernel_snapshot 失败 Flutter

Posted

技术标签:

【中文标题】目标 Kernel_snapshot 失败 Flutter【英文标题】:Target Kernel_snapshot failed Flutter 【发布时间】:2020-06-02 13:27:39 【问题描述】:

所以我几周来一直在开发一个小型聊天应用程序,突然弹出这个错误我尝试将频道和版本更改为以前的版本,但它抛出了同样的错误, 我不知道如何继续这个,真的需要一些帮助,谢谢

颤振医生 跑扑医生... 医生摘要(要查看所有详细信息,请运行 flutter doctor -v):

[√] Flutter(通道未知,v1.12.13+hotfix.7,在 Microsoft Windows [版本 10.0.18362.535],语言环境 en-IN)

[√] android 工具链 - 为 Android 设备开发(Android SDK 版本 29.0.2)

[√]Android Studio(3.5版)

[√] VS 代码(版本 1.42.1) [√] 已连接设备(1 个可用)

我从 Channel Stable,v1.12.14+hotfix.8 更改了版本

错误

Invalid depfile: D:\Flutter\Projects\mine_app\.dart_tool\flutter_build\fdcff514ef29f2b2243d53a059d7e06e\kernel_snapshot.d
Invalid depfile: D:\Flutter\Projects\mine_app\.dart_tool\flutter_build\fdcff514ef29f2b2243d53a059d7e06e\kernel_snapshot.d

Compiler message:
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/top_level.dart:1:8: Error: Not found: 'dart:html'
import 'dart:html';
       ^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/js.dart:8:1: Error: Not found: 'dart:js'
export 'dart:js' show allowInterop, allowInteropCaptureThis;
^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/js_util.dart:8:1: Error: Not found: 'dart:js_util'
export 'dart:js_util';
^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:306:25: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
 - 'Auth' is from 'package:firebase/src/auth.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').      
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      var nextWrapper = allowInterop((firebase_interop.UserJsImpl user) 
                        ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:310:26: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
 - 'Auth' is from 'package:firebase/src/auth.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      var errorWrapper = allowInterop((e) => _changeController.addError(e));
                         ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:340:25: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
 - 'Auth' is from 'package:firebase/src/auth.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      var nextWrapper = allowInterop((firebase_interop.UserJsImpl user) 
                        ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart:345:11: Error: The method 'allowInterop' isn't defined for the class 'Auth'.
 - 'Auth' is from 'package:firebase/src/auth.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/auth.dart').      
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
          allowInterop((e) => _idTokenChangedController.addError(e));
          ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:164:9: Error: The method 'allowInterop' isn't defined for the class 'DatabaseReference<T>'.
 - 'DatabaseReference' is from 'package:firebase/src/database.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
        allowInterop((update) => jsify(transactionUpdate(dartify(update))));
        ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:166:26: Error: The method 'allowInterop' isn't defined for the class 'DatabaseReference<T>'.
 - 'DatabaseReference' is from 'package:firebase/src/database.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
    var onCompleteWrap = allowInterop(
                         ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:301:24: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
 - 'Query' is from 'package:firebase/src/database.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
    var callbackWrap = allowInterop((database_interop.DataSnapshotJsImpl data,
                       ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:325:30: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
 - 'Query' is from 'package:firebase/src/database.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
    jsObject.once(eventType, allowInterop(
                             ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart:402:22: Error: The method 'allowInterop' isn't defined for the class 'DataSnapshot'.
 - 'DataSnapshot' is from 'package:firebase/src/database.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/database.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
    var actionWrap = allowInterop((d) => action(DataSnapshot.getInstance(d)));
                     ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:72:27: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
 - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      final nextWrapper = allowInterop((payload) 
                          ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:75:28: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
 - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      final errorWrapper = allowInterop((e) 
                           ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:87:27: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
 - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      final nextWrapper = allowInterop((payload) 
                          ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:97:27: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
 - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      final nextWrapper = allowInterop((_) => null);
                          ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart:98:28: Error: The method 'allowInterop' isn't defined for the class 'Messaging'.
 - 'Messaging' is from 'package:firebase/src/messaging.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/messaging.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      final errorWrapper = allowInterop((e) 
                           ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart:317:11: Error: The method 'allowInterop' isn't defined for the class 'UploadTask'.
 - 'UploadTask' is from 'package:firebase/src/storage.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
          allowInterop((storage_interop.UploadTaskSnapshotJsImpl data) 
          ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart:321:26: Error: The method 'allowInterop' isn't defined for the class 'UploadTask'.
 - 'UploadTask' is from 'package:firebase/src/storage.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      var errorWrapper = allowInterop((e) => _changeController.addError(e));
                         ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart:322:26: Error: The method 'allowInterop' isn't defined for the class 'UploadTask'.
 - 'UploadTask' is from 'package:firebase/src/storage.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/storage.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      var onCompletion = allowInterop(() => _changeController.close());
                         ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/top_level.dart:194:7: Error: Method not found: 'hasProperty'.
  if (js.hasProperty(error, 'message')) 
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/top_level.dart:195:19: Error: Method not found: 'getProperty'.
    var message = js.getProperty(error, 'message');
                  ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:29:7: Error: Method not found: 'hasProperty'.
  if (util.hasProperty(jsObject, 'firestore') &&
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:30:7: Error: Method not found: 'hasProperty'.
      util.hasProperty(jsObject, 'id') &&
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:31:7: Error: Method not found: 'hasProperty'.
      util.hasProperty(jsObject, 'parent')) 
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:37:7: Error: Method not found: 'hasProperty'.
  if (util.hasProperty(jsObject, 'latitude') &&
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:38:7: Error: Method not found: 'hasProperty'.
      util.hasProperty(jsObject, 'longitude') &&
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:44:15: Error: Method not found: 'getProperty'.
  var proto = util.getProperty(jsObject, '__proto__');
              ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:46:7: Error: Method not found: 'hasProperty'.
  if (util.hasProperty(proto, 'toDate') &&
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:47:7: Error: Method not found: 'hasProperty'.
      util.hasProperty(proto, 'toMillis')) 
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:52:7: Error: Method not found: 'hasProperty'.
  if (util.hasProperty(proto, 'isEqual') &&
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:53:7: Error: Method not found: 'hasProperty'.
      util.hasProperty(proto, 'toBase64')) 
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:67:24: Error: Method not found: 'getProperty'.
    map[key] = dartify(util.getProperty(jsObject, key));
                       ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:91:17: Error: Method not found: 'newObject'.
    var jsMap = util.newObject();
                ^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:93:7: Error: Method not found: 'setProperty'.
      util.setProperty(jsMap, key, jsify(value));
      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:116:12: Error: Method not found: 'allowInterop'.
    return allowInterop(dartObject);
           ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:124:5: Error: Method not found: 'callMethod'.
    util.callMethod(jsObject, method, args);
    ^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:139:19: Error: Method not found: 'promiseToFuture'.
    value = await util.promiseToFuture(thenable);
                  ^^^^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:141:9: Error: Method not found: 'hasProperty'.
    if (util.hasProperty(e, 'code')) 
        ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:152:27: Error: Method not found: 'allowInterop'.
  return PromiseJsImpl<S>(allowInterop((
                          ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:165:5: Error: Method not found: 'allowInterop'.
    allowInterop(c.completeError);
    ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:173:22: Error: Method not found: 'getProperty'.
  String get code => util.getProperty(_source, 'code');
                     ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:176:25: Error: Method not found: 'getProperty'.
  String get message => util.getProperty(_source, 'message');
                        ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:179:22: Error: Method not found: 'getProperty'.
  String get name => util.getProperty(_source, 'name');
                     ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:182:32: Error: Method not found: 'getProperty'.
  Object get serverResponse => util.getProperty(_source, 'serverResponse');
                               ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/utils.dart:185:23: Error: Method not found: 'getProperty'.
  String get stack => util.getProperty(_source, 'stack');
                      ^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:105:30: Error: The method 'allowInterop' isn't defined for the class 'Firestore'.
 - 'Firestore' is from 'package:firebase/src/firestore.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
    var updateFunctionWrap = allowInterop((transaction) =>
                             ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:306:11: Error: The method 'allowInterop' isn't defined for the class 'DocumentReference'.
 - 'DocumentReference' is from 'package:firebase/src/firestore.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
          allowInterop((firestore_interop.DocumentSnapshotJsImpl snapshot) 
          ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:310:26: Error: The method 'allowInterop' isn't defined for the class 'DocumentReference'.
 - 'DocumentReference' is from 'package:firebase/src/firestore.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
      var errorWrapper = allowInterop((e) => controller.addError(e));
                         ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:445:9: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
 - 'Query' is from 'package:firebase/src/firestore.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
        allowInterop((firestore_interop.QuerySnapshotJsImpl snapshot) 
        ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:449:24: Error: The method 'allowInterop' isn't defined for the class 'Query<T>'.
 - 'Query' is from 'package:firebase/src/firestore.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
    var errorWrapper = allowInterop((e) => controller.addError(e));
                       ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart:775:9: Error: The method 'allowInterop' isn't defined for the class 'QuerySnapshot'.
 - 'QuerySnapshot' is from 'package:firebase/src/firestore.dart' ('../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/firestore.dart').
Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
        allowInterop((s) => callback(DocumentSnapshot.getInstance(s)));
        ^^^^^^^^^^^^
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/src/interop/js_interop.dart:17:7: Error: Method not found: 'hasProperty'.  
  if (util.hasProperty(jsObject, 'toDateString')) 
      ^^^^^^^^^^^
../../SDK/flutter/packages/flutter/lib/src/painting/_network_image_web.dart:64:12: Error: Method not found: 'webOnlyInstantiateImageCodecFromUrl'.
    return ui.webOnlyInstantiateImageCodecFromUrl(resolved); // ignore: undefined_function
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
U                                                                       
nhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-
uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
#0      StandardFileSystem.entityForUri (package:front_end/src/api_prototype/stan
dard_file_system.dart:33:7)
#1      asFileUri (package:vm/kernel_front_end.dart:604:37)
#2      
writeDepfile (package:vm/kernel_front_end.dart:799:21)
<asynchronous suspension>
#3    
  FrontendCompiler.compile (package:frontend_server/frontend_server.dart:472:15)
<asyn
chronous suspension>
#4      _FlutterFrontendCompiler.compile (package:flutter_fronten
d_server/server.dart:38:22)
#5      starter (package:flutter_frontend_server/server.
dart:149:27)
#6      main (file:///C:/b/s/w/ir/cache/builder/src/flutter/flutter_frontend_ser
ver/bin/starter.dart:8:30)
#7      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart
:305:32)
#8      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)

Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

* Where:
Script 'D:\Flutter\SDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\Flutter\SDK\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

【问题讨论】:

flutter clean 是的,尝试过 flutter clean 仍然出现同样的错误 【参考方案1】:

您必须注释掉网络依赖项以及 dart 文件中的代码。

在您的 pubspec.yaml 中

# firebase 7.2.1

并注释掉你的导入

【讨论】:

似乎是 firebase 依赖中的一个错误,当我在 2 天后加载相同的程序时,它就像一个魅力

以上是关于目标 Kernel_snapshot 失败 Flutter的主要内容,如果未能解决你的问题,请参考以下文章

sudo: unable to resolve host iZ2zecsdy8flu603bmdg1bZ

Flu epidemic in Guangdong, no need to panic, says expert

出现“找不到目标文件”lib\main.dart“之类的错误。”在颤振中构建 APK

Flutter:Cocoapods 'Pods-Runner' 目标具有传递依赖项,包括静态二进制文件:Flutter.framework

在 Flutter 中创建一个动画屏幕

怎样设定目标——设定目标失败的七大原因