Flutter.io Android License Status Unknown

前端 未结 30 998
情歌与酒
情歌与酒 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.

    0 讨论(0)
  • 2020-11-27 13:13

    The right solution would be if you have android studio installed then

    1. open SDK manager
    2. under SDK tools uncheck hide obsolete packages at the bottom
    3. then you should see an option called Android SDK Tools (Obsolete)

    1. check it and apply and let the studio download the package
    2. once done run the command flutter doctor and it should now prompt you to run flutter doctor --android-licenses once you run the license command accept all licenses by hitting y and it should solve the problem

    0 讨论(0)
  • 2020-11-27 13:14

    Here are the steps that solve my problem:

    1. Open your terminal
    2. type flutter doctor --android-licenses
    3. press y to accept, this process may occurred several times. Done!
    0 讨论(0)
  • 2020-11-27 13:15

    I faced the same problem, like mentioned above I tried these.

    1. Installed JDK 1.8 and set my JAVA_HOME env to 1.8 - This did not work
    2. My Android studio didn't show any "Android SDK Tools (Obsolete)" but had had an "Android SDK Tools"

    This is what worked for me:

    1. Delete the "Android SDK Tools" from SDK Manager
    2. Reinstall it by first deselecting the "Hide Obsolete Packages" and then select "Android SDK Tools (Obsolete)", install it.
    3. run flutter doctor --android-licenses and select y for the prompts
    4. run flutter doctor and everything will be fine!!!!
    0 讨论(0)
  • 2020-11-27 13:16

    Follow these simple steps.

    1. go to tools, then SDK manager, then click on android SDK.
    2. click SDK update sites tab.
    3. check the checkbox that states https://..sources to be fetched using https://.
    4. click apply and ok.
    5. Now restart android studio.
    6. go to SDK tools and check the checkbox that states Hide obsolete packages.
    7. wait for about a minute or so for the packages appear.
    8. then select a package called "android SDK tools (obsolete), and press okay.
    9. continue to install the package.
    10. after installation restart android studio and also restart cmd, then run flutter doctor.
    11. it will take a couple of minutes and it should work
    0 讨论(0)
  • 2020-11-27 13:17

    For someone who is still facing the issue:
    As answered below by Tommie C, Aba and few other people, but may not be clear enough as I found it.
    Try installing java 1.8 manually as described here on windows/linux: [https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html]
    and setting $JAVA_HOME variable(jdk path).
    On windows set jdk path($JAVA_HOME) : [How to set java_home on Windows 7?.
    On linux: [https://askubuntu.com/questions/175514/how-to-set-java-home-for-java].
    Then run flutter doctor --android-licenses and accept all the licenses. Hope it helps.

    0 讨论(0)
提交回复
热议问题