简体   繁体   English

在设备“等待应用程序启动超时”上启动Flutter应用程序时出现问题

[英]Problem launching Flutter application on device “timeout waiting for the application to start”

After some time mine Flutter application stopped building on a device. 一段时间后,我的Flutter应用程序停止在设备上构建。 I tried flutter clean , Invalidate Caches and Restart in Android Studio, restarting device and Android Studio, nothing helps :(. The application still builds ok on the emulator though. 我尝试在Android Studio中进行flutter clean ,Invalidate Caches和Restart,重新启动设备和Android Studio,但无济于事:(。该应用程序仍然可以在模拟器上正常构建。

the Run log: 运行日志:

Launching lib/main.dart on Mi A1 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
timeout waiting for the application to start

Found the problem. 找到了问题。 Application was installed for other users on my phone, after I uninstalled it for all users the problem disappeared. 我为所有用户卸载了其他用户的应用程序后,问题消失了。

If you are using android studio, a simple Invalidate Caches / Restart... would do. 如果您使用的是Android Studio,则可以执行简单的Invalidate Caches / Restart...。 I tried it and it work. 我试过了,它起作用了。

Go to File > Invalidate Caches / Restart... 转到文件>使缓存无效/重新启动...

单击pubspec.yaml并单击包获取...它解决了我的问题

Simply wait for a while instead of cancelling multiple times. 只需等待一段时间,而不是取消多次。 It solved the issue. 它解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM