android studio 启动flutter工程, AS报错(注意是AS异常, 工程能够正常启动并安装到手机)

tanne222
  • 1
新手上路,请多包涵

如题, 报错信息如下:

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

环境: Android Studio 3.3.1, Flutter 1.0.0

clipboard.png

回复
阅读 2.6k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏