Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Android SDK found. Try setting the ANDROID_SDK_ROOT environment variable

When I m trying to compile my app it is showing [!] No Android SDK found. Try setting the ANDROID_SDK_ROOT environment variable.

But when I run it shows-

Doctor summary (to see all details, run flutter
doctor -v):
[✓] Flutter (Channel master, 1.27.0-5.0.pre.94, on
    Linux, locale C.UTF-8)
[✗] Chrome - develop for the web (Cannot find
    Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting
      CHROME_EXECUTABLE to a Chrome executable.
[✗] Flutter IDE Support (No supported IDEs
    installed)
[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.

Byw I m using VS Code but on termux and I m new to flutter and this is my first app.

like image 221
Priyanshu Kumar Avatar asked Nov 07 '25 08:11

Priyanshu Kumar


2 Answers

This is for Ubuntu. Change the path to your SDK directory.

export ANDROID_SDK_ROOT=/usr/lib/android-sdk

This is for windows. Change the path to your SDK directory.

set ANDROID_SDK_ROOT="C:\installation location\android-sdk"
like image 174
zeitgeist Avatar answered Nov 10 '25 03:11

zeitgeist


Set ANDROID_SDK_ROOT variable under system variables. You also need to restart the android studio after setting system variable.

For ex.

ANDROID_SDK_ROOT = "C:\Android\SDK"
like image 34
Sagar Maher Avatar answered Nov 10 '25 04:11

Sagar Maher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!