无法找到flutter doctor的android SDK

hel*_*345 6 sdk android android-studio flutter

我曾尝试在计算机上卸载并重新安装颤振两次,但每当我运行时flutter doctor在终端中运行时,我仍然会遇到以下错误。

\n
[\xe2\x9c\x97] Android toolchain - develop for Android devices\n\xe2\x9c\x97 Unable to locate Android SDK.\n  Install Android Studio from:\n  https://developer.android.com/studio/index.html\n  On first launch it will assist you in installing the Android SDK\n  components.\n  (or visit https://flutter.dev/docs/get-started/install/macos#android-setup\n  for detailed instructions).\n  If the Android SDK has been installed to a custom location, set\n  ANDROID_SDK_ROOT to that location.\n  You may also want to add it to your PATH environment variable.\n
Run Code Online (Sandbox Code Playgroud)\n

有谁知道如何解决这个问题?另外,这可能是我的模拟器都没有运行我的应用程序的原因吗?谢谢,抱歉,我对 Flutter 和 android studio 还很陌生。

\n

小智 12

如果无法找到您的 Android SDK,原因可能是您的 Android SDK 路径不是最新的。

我认为您的问题与此类似:https://github.com/flutter/flutter/issues/45007

尝试flutter config --android-sdk <path-to-your-android-sdk-path>更新Android SDK路径。