Android studio starts the flutter project and AS reports an error (note that the project can be started normally and installed to the mobile phone due to AS exception)

for example, the error message is as follows:

java.lang.reflect.InvocationTargetException

at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.execution.process.ProcessHandler$5.invoke(ProcessHandler.java:223)
at com.sun.proxy.$Proxy17.onTextAvailable(Unknown Source)
at com.intellij.execution.process.ProcessHandler.notifyTextAvailable(ProcessHandler.java:197)
at com.intellij.execution.process.BaseOSProcessHandler$SimpleOutputReader.onTextAvailable(BaseOSProcessHandler.java:198)
at com.intellij.util.io.BaseOutputReader.sendText(BaseOutputReader.java:202)
at com.intellij.util.io.BaseOutputReader.processInput(BaseOutputReader.java:186)
at com.intellij.util.io.BaseOutputReader.readAvailableNonBlocking(BaseOutputReader.java:105)
at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:85)
at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:163)
at com.intellij.util.io.BaseDataReader$1$1.run(BaseDataReader.java:66)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:229)
at com.intellij.util.io.BaseDataReader$1.run(BaseDataReader.java:63)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.IllegalArgumentException: Argument for @ NotNull parameter "launchMode" of io/flutter/run/daemon/FlutterApp.setLaunchMode must not be null

at io.flutter.run.daemon.FlutterApp.$$$reportNull$$$0(FlutterApp.java)
at io.flutter.run.daemon.FlutterApp.setLaunchMode(FlutterApp.java)
at io.flutter.run.daemon.FlutterAppDaemonEventListener.onAppStarting(FlutterApp.java:726)
at io.flutter.run.daemon.DaemonEvent$AppStarting.accept(DaemonEvent.java:190)
at io.flutter.run.daemon.DaemonEvent.dispatch(DaemonEvent.java:52)
at io.flutter.run.daemon.DaemonApi.dispatch(DaemonApi.java:171)
at io.flutter.run.daemon.DaemonApi$1.onTextAvailable(DaemonApi.java:142)
... 20 more

Environment: Android Studio 3.3.1, Flutter 1.0.0

clipboard.png

Jul.05,2022
Menu