Android license status unknown while running flutter doctor

Viewed 177

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 Answers

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

Related