Flutter - :app:flutterBuildDebug FAILED

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

我已按照网站上的所有步骤在我的计算机上安装了颤动。当我发出命令

$ flutter run

我收到一个错误

    [ +250 ms] :app:flutterBuildDebug FAILED
[   +5 ms] FAILURE: Build failed with an exception.
[   +2 ms] * What went wrong:
[        ] Failed to capture snapshot of input files for task 'flutterBuildDebug' property 'sourceFiles' during up-to-date check.
[   +1 ms] > Failed to create MD5 hash for file 'C:\Users\Vidya\AppData\Local\Microsoft\InputPersonalization\TextHarvester\WaitList.dat'.
[        ] * Try:
[        ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[        ] * Get more help at https://help.gradle.org
[   +1 ms] BUILD FAILED in 2s
[        ] 10 actionable tasks: 1 executed, 9 up-to-date
[ +757 ms] "flutter run" took 11,552ms.
Gradle build failed: 1

救命 !

android flutter
2个回答
0
投票

您是否正确安装了Android Studio?如果是,那么我建议:

  1. 在Android Studio中创建一个新应用。
  2. 让应用程序完全加载。

可能Gradle没有被颤动挑选,这应该可以解决你的问题


0
投票

建议您升级所有Android SDK和Android Studio。并添加$ path如下:

export ANDROID_SDK_ROOT="/Applications/AndroidDev/sdk"

export ANDROID_NDK_HOME="/Applications/AndroidDev/sdk/ndk-bundle"

export ANDROID_HOME=$ANDROID_SDK_ROOT

export PATH="$ANDROID_HOME/emulator:$PATH"
export PATH="$ANDROID_HOME/tools:$PATH"
export PATH="$ANDROID_HOME/platform-tools:$PATH"

使用您自己的环境特定路径。

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