[✗] Android toolchain - develop

2022-04-04  本文已影响0人  WANKUN

Mac终端执行flutter doctor时,报Android SDK地址未找到,如下

[✗] Android toolchain - develop for Android devices

    ✗ Unable to locate Android SDK.

      Install Android Studio from:

      https://developer.android.com/studio/index.html

      On first launch it will assist you in installing the Android SDK

      components.

      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup

      for detailed instructions).

      If the Android SDK has been installed to a custom location, set

      ANDROID_SDK_ROOT to that location.

      You may also want to add it to your PATH environment variable.

解决方法如下,打开Android Studio->点击右下角的Configure->点击SDK Manager,如下图

然后会弹出相应SDK管理界面,如下图:

找到Android SDK Location,复制上面的地址路径,/Users/你的用户名/Library/Android/sdk

然后到终端输入命令:flutter config --android-sdk /Users/你的用户名/Library/Android/sdk

再次执行:flutter doctor,问题解决!

上一篇 下一篇

猜你喜欢

热点阅读