Flutter.io Android License Status Unknown

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

    WARNING: This answer is useful if you have problems with JAVA_HOME environmental variable and the direction of that. If you do not have this problem, you should not try this solution.

    If you have this error and you tried with flutter doctor --android-licenses or sdkmanager --licenses and you got a problem with your JAVA_HOME environmental variable, then you have to read this.

    I have a MacOS Catalina ant I could resolve this problem successfully with the next steps:

    1. Open your terminal
    2. Type: open -e .bash_profile (You should see almost two environmental variables: flutter and JAVA_HOME)
    3. Save JAVA_HOME environmental variable written there in a textEdit file if you wish and DELETE the JAVA_HOME environmental variable. Save the bash_profile.
    4. Go to terminal again and run source $HOME/.bash_profile
    5. Try again flutter doctor and you shouldn't see the same error any more.

    Please, let me know if you have doubts.

提交回复
热议问题