flutter build apk命令引发未处理的异常错误

时间:2020-05-16 05:36:06

标签: flutter

我遇到此错误,无法为我的flutter项目构建apk。 flutter build apk --debug工作正常。我已经尝试了大多数解决方案,例如pub cache repair降级抖动,但问题仍然存在。 我已经使用flutter doctor检查了设置,一切似乎都很好。我曾尝试用飘动的清洁来清洁项目,但这没有帮助。

Unhandled exception:
Stack Overflow                                                            
#0      TreeVisitor.visitDoubleLiteral (package:kernel/visitor.dart:192:3)
#1      DoubleLiteral.accept (package:kernel/ast.dart:4081:44)            
#2      Arguments.visitChildren (package:kernel/ast.dart:7152:14)       
#3      Recur
siveVisitor.defaultNode (package:kernel/visitor.dart:601:10)
#4      Visitor.defaultTreeNode (package:kernel/visitor.dart:514:39)    
#5      TreeVisitor.visitArguments (package:kernel/visitor.dart:261:39)
#6      MethodInvocation.visitChildren (package:kernel/ast.dart:3206:38)
#7      RecursiveVisitor.defaultNode (package:kernel/visitor.dart:601:10)
#8      Visitor.defaultTreeNode (package:kernel/visitor.dart:514:39)
#9      TreeVisitor.defaultExpression (package:kernel/visitor.dart:144:43)
#10     Devirtualization.visitMethodInvocation (package:vm/transformations/devirtualization.dart:174:2063)
#11     MethodInvocation.accept (package:kernel/ast.dart:3350:44)       
#12     VariableDeclaration.visitChildren (package:kernel/ast.dart:5344:18)
#13     RecursiveVisitor.defaultNode (package:kernel/visitor.dart:601:10)
#14     Visitor.defaultTreeNode (package:kernel/visitor.dart:514:39)    
#15     TreeVisitor.defaultStatement (package:kernel/visitor.dart:203:41)
#16     TreeVisitor.visitVariableDeclaration (package
:kernel/visitor.dart:225:7)
#17     Let.visitChildren (package:kernel/ast.dart:5337:43)
#18     RecursiveVisitor.defaultNode (package:kernel/visitor.dart:601:10)
#1
9     Visitor.defaultTreeNode (package:kernel/visitor.dart:514:39)
#20     TreeVisitor.defaultExpression (package:kernel/visitor.dart:144:43)
#21     TreeVisitor.visitLet (package:kernel/vi
sitor.dart:195:27)
#22     Let.accept (package:kernel/ast.dart:4417:44)
#23     Let.visitChildren (package:kernel/ast.dart:
4422:11)
#24     RecursiveVisitor.defaultNode (package:kernel/visitor.dart:601:10)
#25     Visitor.defaultTreeNode (package:kernel/v
isitor.dart:514:39)
#26     TreeVisitor.defaultExpression (package:kernel/visitor.dart:144:43)
#27     TreeVisitor.visitLe
t (package:kernel/visitor.dart:195:27)
#28     Let.accept (package:kernel/ast.dart:4417:44)
#29     Let.visitChildren (package:kernel/ast.d
art:4422:11)
#30     RecursiveVisitor.defaultNode (package:kernel/visitor.dart:601:10)
#31     Visitor.defaultTreeNode (package:kernel/visitor.dart:514:39)    
#
32     TreeVisitor.defaultExpression (package:kernel/visitor.dart:144:43)
#33     TreeVisitor.visitLet (package:kernel/visitor.dart:195:27)       
#34     Let.accept (package:kernel/ast
.dart:4417:44)
#35     Let.visitChildren (package:kernel/ast.dart:4422:11)
#36     RecursiveVisitor.defaultNode (package:kernel/visitor.dart:601:10)
#37     Visitor.
defaultTreeNode (package:kernel/visitor.dart:514:39)
#38     TreeVisitor.defaultExpression (package:kernel/visito
r.dart:144:43)
#39     TreeVisitor.visitLet (package:kernel/visitor.dart:195:27)
#40     Let.accept (package:kernel/as
t.dart:4417:44)
#41     Let.visitChildren (package:kernel/ast.dart:4422:11)
#42     RecursiveVisitor.defaultNode (package:kernel/visit
or.dart:601:10)
#43     Visitor.defaultTreeNode (package:kernel/visitor.dart:514:39)
...
...

#18013  _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:74:64)
#18014  _rootRunUna
ry (dart:async/zone.dart:1134:38)
#18015  _FutureListener.handleValue (dart:async/future_impl.dar
t:818:10625)
#18016  Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682
:45)
#18017  Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#18018  _completeOnAsyncReturn (dart:async-patch/async_patch.dart:317:7343)
#18019  KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/k
ernel/kernel_target.dart)
#18020  _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:74:64)
#18021  _rootRunUnary (dart:async/zone.dart:1134:38)
#18022  _FutureListe
ner.handleValue (dart:async/future_impl.dart:818:10625)
#18023  Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#18024 
 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#18025  _completeOn
AsyncReturn (dart:async-patch/async_patch.dart:317:7343)
#18026  Loader.buildBodies (package:front_en
d/src/fasta/loader.dart)
#18027  _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:74:64)
#18028  _
rootRunUnary (dart:async/zone.dart:1134:38)
#18029  _FutureListener.handleValue (dart:async/future_impl.dart:818:10625)
#18030  Future._propagateToListeners.handleValu
eCallback (dart:async/future_impl.dart:682:45)
#18031  Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#
18032  _completeOnAsyncReturn (dart:async-patch/async_patch.dart:317:7343)
#18033  SourceLoader.buildBody
 (package:front_end/src/fasta/source/source_loader.dart)
#18034  _asyncThenWrapperHelper.<anonymous closure> (dar
t:async-patch/async_patch.dart:74:64)
#18035  _rootRunUnary (dart:async/zone.dart:1134:38)
#18036  _FutureListener.handleV
alue (dart:async/future_impl.dart:818:10625)
#18037  Future._propagateToListeners.handleValueCallba
ck (dart:async/future_impl.dart:682:45)
#18038  Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#180
39  Future._completeWithValue (dart:async/future_impl.dart:526:5)       
#18040  Future._asyncComplete.<
anonymous closure> (dart:async/future_impl.dart:556:7)
#18041  _rootRun (dart:async/zone.dart:1126:13)
#18042  _
CustomZone.run (dart:async/zone.dart:1023:19)
#18043  _CustomZone.bindCallback.<anonymous
 closure> (dart:async/zone.dart:949:23)
#18044  _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#18045  _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#18046  _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#18047  _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)

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

FAILURE: Build failed with an exception.

0 个答案:

没有答案