Flutter.io Android License Status Unknown

前端 未结 30 1104
情歌与酒
情歌与酒 2020-11-27 12:29

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3) >>• Android SDK a ..\\Android\\sdk • Android NDK location not configured (optiona

30条回答
  •  攒了一身酷
    2020-11-27 13:12

    MacOS 10.15: Android Studio 3.5.1:

    The solution that works for me was to use the Java Environment tool jenv (installed via homebrew). This tool changes the $JAVA_HOME when one switches between java versions.

    In my case I have multiple Java versions installed and the current global version in use was the default. I also found it necessary to comment out the $JAVA_HOME environment variable in my .bash_profile when using this tool.

    In Terminal, I entered jenv global 1.8 to get java 1.8 running instead of a later version (I have multiple versions installed).

    After that:

    flutter doctor --android-licenses

    OR

    sdkmanager --licenses

    both work fine.

    Note: You may need to exit and reopen your Terminal shell if you have to redefine the $JAVA_HOME environment variable.

提交回复
热议问题