我已使用预热颤动引擎将颤动添加到现有的android应用中。
DBCC shrinkfile('Sample_log',0)
当我摧毁颤振引擎var flutterEngine = FlutterEngineCache.getInstance().get(Constants.FLUTTER_ENGINE)
if (flutterEngine == null) {
flutterEngine = FlutterEngine(this)
FlutterEngineCache.getInstance().put(Constants.FLUTTER_ENGINE, flutterEngine)
flutterEngine.navigationChannel.setInitialRoute(
"route1"
)
flutterEngine.dartExecutor.executeDartEntrypoint(
DartExecutor.DartEntrypoint.createDefault()
)
}
时
我收到以下错误。
FlutterEngineCache.getInstance().get(Constants.FLUTTER_ENGINE)?.destroy()