I have been installing flutter and Android Studio for a few times because I've encountered an unsolved issue. At first, the issue was it did not detect my Android Studio but The Android toolchain had no issue.

Android Studio issue

After I config my Android Studio and run flutter doctor again, Android Studio was not an issue anymore but turns out Android Toolchain became an issue.

Android toolchain issue

Android Studio issue2

My java version: jre1.8.0_291

my java version

I found some solutions stating that the Obsolete package should be installed in the SDK tools and I already have that Android SDK Tools Obsolete


Solution 1: vedant_barve

If you read the terminal output of the second image carefully, you need to accept the SDK licenses by flutter doctor --android-licenses


Solution 2: Priscilla

I have successfully solved the issue by editing the environmental variables, set JAVA_HOME values to

C:\Program Files (x86)\Java\jre1.8.0_291

it was previously at the Android Studio jre