如题,在release模式下dump出来的app.dill正常地进行了转换,但是编译报错,错误信息如下(对应的是flutter 1.17.1的apsectd版本):
[ +482 ms] [ +506 ms] ../../third_party/dart/runtime/vm/compiler/aot/dispatch_table_generator.cc: 452: error: Function has no assigned
selector ID.
[ +2 ms] [ +13 ms] Dart snapshot generator failed with exit code -6
[ ] [ +5 ms] Persisting file store
[ ] [ +25 ms] Done persisting file store
[ +99 ms] [ +11 ms] Target android_aot_release_android-arm64 failed: Exception: AOT snapshotter exited with code -6
[ ] build failed.
[ +1 ms] #0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
[ ] #1 AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:202:7)
[ +1 ms] #2 _rootRunUnary (dart:async/zone.dart:1192:38)
[ ] #3 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[ ] #4 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[ ] #5 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[ ] #6 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[ ] #7 Future._completeWithValue (dart:async/future_impl.dart:526:5)
[ ] #8 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[ ] #9 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[ ] #10 BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart)
[ ] #11 _rootRunUnary (dart:async/zone.dart:1192:38)
[ ] #12 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[ ] #13 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[ ] #14 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[ ] #15 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[ ] #16 Future._completeWithValue (dart:async/future_impl.dart:526:5)
[ ] #17 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[ ] #18 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[ ] #19 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart)
[ ] #20 _rootRunUnary (dart:async/zone.dart:1192:38)
[ +61 ms] #21 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[ ] #22 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[ ] #23 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[ ] #24 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[ ] #25 Future._completeWithValue (dart:async/future_impl.dart:526:5)
[ +2 ms] #26 Future.wait. (dart:async/future.dart:402:22)
[ ] #27 _rootRunUnary (dart:async/zone.dart:1192:38)
[ ] #28 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[ ] #29 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[ ] #30 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[ +5 ms] #31 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[ ] #32 Future._completeWithValue (dart:async/future_impl.dart:526:5)
[ ] #33 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[ ] #34 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[ ] #35 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart)
[ ] #36 _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:86:61)
[ ] #37 _rootRunBinary (dart:async/zone.dart:1204:38)
[ ] #38 _CustomZone.runBinary (dart:async/zone.dart:1093:19)
[ ] #39 _FutureListener.handleError (dart:async/future_impl.dart:155:20)
[ ] #40 Future._propagateToListeners.handleError (dart:async/future_impl.dart:694:47)
[ +15 ms] [ +17 ms] "flutter assemble" took 5,489ms.
[ ] > Task :app:compileFlutterBuildRelease FAILED
[ ] 1 actionable task: 1 executed
[ ] #41 Future._propagateToListeners (dart:async/future_impl.dart:715:24)
[ ] #42 Future._completeError (dart:async/future_impl.dart:534:5)
[ ] #43 _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:43:15)
[ ] #44 AndroidAot.build (package:flutter_tools/src/build_system/targets/android.dart)
[ ] #45 _rootRunUnary (dart:async/zone.dart:1192:38)
[ ] #46 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[ ] #47 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[ ] #48 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[ +20 ms] #49 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[ ] #50 Future._completeWithValue (dart:async/future_impl.dart:526:5)
[ ] #51 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[ ] #52 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[ ] #53 AOTSnapshotter.build (package:flutter_tools/src/base/build.dart)
[ ] #54 _rootRunUnary (dart:async/zone.dart:1192:38)
[ ] #55 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[ ] #56 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[ ] #57 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[ +13 ms] #58 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[ ] #59 Future._completeWithValue (dart:async/future_impl.dart:526:5)
[ ] #60 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
[ ] #61 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
[ ] #62 _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart)
[ ] #63 _rootRunUnary (dart:async/zone.dart:1192:38)
[ ] #64 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[ ] #65 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
[ ] #66 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
[ ] #67 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
[ +11 ms] #68 Future._completeWithValue (dart:async/future_impl.dart:526:5)
[ ] #69 Future._asyncComplete. (dart:async/future_impl.dart:556:7)
[ ] #70 _rootRun (dart:async/zone.dart:1184:13)
[ ] #71 _CustomZone.run (dart:async/zone.dart:1077:19)
[ ] #72 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
[ ] #73 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1019:23)
[ ] #74 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
[ ] #75 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
[ ] #76 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
[ ] #77 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[ +8 ms] FAILURE: Build failed with an exception.
[ ] * Where:
[ ] Script '/Users/lwy/fvm/versions/1.17.1-inner.1/packages/flutter_tools/gradle/flutter.gradle' line: 882
[ ] * What went wrong:
[ ] Execution failed for task ':app:compileFlutterBuildRelease'.
[ ] > Process 'command '/Users/lwy/fvm/versions/1.17.1-inner.1/bin/flutter'' finished with non-zero exit value 1
代码用的是库的example