Android license status unknown while running flutter doctor

好久不见. 提交于 2021-02-10 23:35:52

问题


I am not able to run flutter apps because the error keeps popping up in the cmd section that Android license unknown. I've even tried updating android studio, but no help. Also an error comes but I crossed checked it that the file it asks to delete is already deleted and android sdk manager is already present. I'm copying the errors:

1)Android license not found error

X Android license status unknown. Try re-installing or updating your Android SDK Manager. See https://developer.android.com/studio/#downloads or visit visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.

2)Android sdk manager and gradle-wrapper error

Failed to delete "C:\flutter\bin\cache\downloads\storage.googleapis.com\flutter_infra\gradle-wrapper\fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa\gradle-wrapper.tgz". Please delete manually. FileSystemException: Cannot delete file, path = 'C:\flutter\bin\cache\downloads\storage.googleapis.com\flutter_infra\gradle-wrapper\fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa\gradle-wrapper.tgz' (OS Error: The process cannot access the file because it is being used by another process. , errno = 32) Android sdkmanager tool not found (C:\Users\hp\AppData\Local\Android\Sdk\tools\bin\sdkmanager). Try re-installing or updating your Android SDK, visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.


回答1:


First , you should check the following things:

  • Java JDK setup and add it (JAVA_HOME) to environment variables ( Windows operating system) .

  • Install a Gradle and add it to the environment variables (GRADLE_HOME).

  • Install the SDK Android and to add it to the environment variables (ANDROID_HOME).

Then The command is executed in Flutter cmd

flutter doctor --android-licenses

I hope I helped you



来源:https://stackoverflow.com/questions/63290603/android-license-status-unknown-while-running-flutter-doctor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!