Flutter.io Android License Status Unknown

前端 未结 30 995
情歌与酒
情歌与酒 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:06

    For Windows people a short term solution is to downgrade to JDK8. Hopefully flutter will fix the issue soon for Android SDK to be working with >JDK8.

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

    Here's what I did to fix my issue. Please note that, you don't have to uninstall your old copy of Android Studio/SDK. Android Studio will take care of that whilst you are installing the latest version.

    1. Downloaded & install the latest version of Android Studio
    2. Follow the instructions in this tutorial
    3. Once the installation is complete, run flutter doctor and check, your issue should have been resolved. If the issue is resolved, there's no need to run the flutter doctor --android-licenses command.
    0 讨论(0)
  • 2020-11-27 13:09

    here is my solution:

    1. install SDKMan

      $ curl -s "https://get.sdkman.io" | bash

    2. setting your bash_profile

      $ source "$HOME/.sdkman/bin/sdkman-init.sh

      $ source ~/.bash_profile

    3. find java sdk, and select want to install version

      $ sdk ls java

      $ sdk install java 8.0.192-zulu

    4. copy your flutter doctor warning message to update sdkmanager

      $ /Users/YourUserName/Library/Android/sdk/tools/bin/sdkmanager --update

    5. after 1~4, redo it

      $ flutter doctor --android-licenses

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

    My environment : Windows 10 64bit, OpenJDK 14.0.2

    Initial errors are as reported above.

    Error was resolved after

    1. Replaced "C:<installation-folder>\openjdk-14.0.2_windows-x64_bin\jdk-14.0.2" with "*C:\Program Files\Android\Android Studio\jre*" in environment variable PATH & JAVA_HOME
    2. ran flutter doctor --android-licenses and selected y for the prompts
    0 讨论(0)
  • 2020-11-27 13:09

    Same problem to me, check your java version at least it must be 1.8

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

    I found this solution for having to use JDK 8 (you need an account to download now!) - use the embedded OpenJDK that comes with Android Studio:

    Add this to your ~/.profile or similar:

    # Use the JDK embedded with Android Studio for command-line builds
    export JAVA_HOME='/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home'
    

    Command-line builds via gradlew, and any other well-behaved script, will then use the version of the SDK that ships with Android Studio 2.2+.

    *My Mac was still using the default Java 7.

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