'flutter run'命令不断崩溃

问题描述 投票:0回答:1

我上周刚开始开发,我甚至无法编写任何代码......我安装了颤振,Android SDK,模拟器,Gradle等等但我还是无法正常运行命令“flutter run”,命中android studio上的播放按钮或VSCode上的“无需调试启动”。我真的需要帮助,因为我无法在任何地方找到帮助。我真的尝试了一切。我也试过连接真实设备,但是当我运行“颤动设备”时,它说“没有连接设备”,是的,我允许在计算机和手机之间传输文件。我的扑了医生说一切都很好。

扑动:

Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider
enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Oops; flutter has exited unexpectedlSending crash report to Google.
Crash report sent (report ID: 5a9b4e39b3f297df)
Initializing gradle...                                                  Crash report written to C:\Users\PATH\TO\DIRECTORY\flutter_05.log;
please let us know at https://github.com/flutter/flutter/issues.

扑医生:

[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.648], locale
    en-IL)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] VS Code (version 1.32.3)
[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.
android flutter android-emulator device
1个回答
0
投票

更新你的android sdk版本,并检查环境变量中的ANROID_HOME变量路径。必须设置为变量值,如下所示

C:\用户\%your_user_name%\应用程序数据\本地\的Android \ SDK

一些android sdk版本与flutter sdk.check不兼容,并且更新它会有所帮助

© www.soinside.com 2019 - 2024. All rights reserved.