美文网首页
[✗] Android toolchain - develop

[✗] Android toolchain - develop

作者: WANKUN | 来源:发表于2022-04-04 17:32 被阅读0次

    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,问题解决!

    相关文章

      网友评论

          本文标题:[✗] Android toolchain - develop

          本文链接:https://www.haomeiwen.com/subject/engfsrtx.html