Repository navigation
flutter not finding my Android SDK (Request to display ANDROID_HOME in flutter doctor) #6516
Description
Activity
- addedtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
on Oct 25, 2016 cc @danrubel
workaround: manually set
ANDROID_HOME. But reading the docs, I get the sense that I shouldn't have had to do that?If you remove
ANDROID_HOMEand runflutter doctorfrom the top level flutter repo directory, then doesflutter doctorfind your Android SDK install location? If you run it from another directory does it not work? That's what I'm seeing on my end after I ranbrew install android-sdk... andbrew uninstall android-sdkdoes not fix it.But then I closed the shell and reopend it and... viola!
flutter doctorfinds now finds the Android SDK regardless of the current directory. Does this work for you?If you remove ANDROID_HOME and run flutter doctor from the top level flutter repo directory, then does flutter doctor find your Android SDK install location?
No. And I'm not sure how/why it would? Does
doctorlook in a variety of common locations on a Mac?If you run it from another directory does it not work?
I ran
flutter doctorfrom$HOME, and it does not find my Android SDK:[x] Android toolchain - develop for Android devices x Android Studio / Android SDK not found. Download from https://developer.android.com/sdk/ (or visit https://flutter.io/setup/#android-setup for detailed instructions).Does this work for you?
Sorry, no. If ANDROID_HOME is not set,
doctorcannot find the Android SDK.Where does
doctorlook for the SDK on a Mac?If you remove ANDROID_HOME and run flutter doctor from the top level flutter repo directory, then does flutter doctor find your Android SDK install location?
No. And I'm not sure how/why it would? Does doctor look in a variety of common locations on a Mac?
I saw this because I was using two different shells... because I installed/uninstalled several times on one, it would work in one and broke in the other. Closing and reopening one caused
flutter doctorto work again. I was hoping that was the issue for you, but no luck.Where does doctor look for the SDK?
It looks for the SDK in the following locations
$ANDROID_HOME$ANDROID_HOME/sdk$homeDirPath/Library/Android/sdk<-- Mac only$homeDirPath/Library/Android/sdk/sdk<-- Mac only$homeDirPath/Android/Sdk<-- Linux only$homeDirPath/Android/Sdk/sdk<-- Linux only
Is your SDK in one of these locations? Or are there an additional locations I should check?
Interesting! Let's debug this in person :)
On Wed, Oct 26, 2016, 10:30 AM Dan Rubel [email protected] wrote:
If you remove ANDROID_HOME and run flutter doctor from the top level
flutter repo directory, then does flutter doctor find your Android SDK
install location?No. And I'm not sure how/why it would? Does doctor look in a variety of
common locations on a Mac?I saw this because I was using two different shells... because I
installed/uninstalled several times on one, it would work in one and broke
in the other. Closing and reopening the one caused flutter doctor to work
again. I was hoping that was the issue for you, but no luck.Where does doctor look for the SDK?
It looks for the SDK in the following locations
- $ANDROID_HOME
- $ANDROID_HOME/sdk
- $homeDirPath/Library/Android/sdk <-- Mac only
- $homeDirPath/Library/Android/sdk/sdk <-- Mac only
- $homeDirPath/Android/Sdk <-- Linux only
- $homeDirPath/Android/Sdk/sdk <-- Linux only
Is your SDK in one of these locations? Or are there an additional
locations I should check?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#6516 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAVZ_Yd_pAgxQSszYaSThHE1rXbUfCEks5q3w-MgaJpZM4KftBF
.DOH!
ANDROID_HOMEwas set. To homebrew. Which I removed. :/perhaps we can display ANDROID_HOME in
flutter doctorso that users like me will see that ANDROID_HOME is incorrect set.Thanks!
- changed the title
[-]flutter not finding my Android SDK[/-][+]flutter not finding my Android SDK (Request to display ANDROID_HOME in flutter doctor)[/+]on Oct 27, 2016 This is super hard. I read SO many of these vague comments...
QUESTION:
WHAT SHOULD ANDROID_HOME BE SET TO?
I am GUESSING C:\Program Files\Android
SAME QUESTION FOR ANDROID SDK FILES:
I am GUESSING C:\Program Files\Android\android-sdk <-- PS that is just the zip you link to you your site extracted with \tools\ inside right?
I am so freaking confused. 3rd open source app software I got stuck on recognizing the SDK tools with little to no coverage on instructions.
WAIT! I get it.. You have to download the SDK put it somewhere and then have Android Studio find and install it. That could be a bit more clear in the instructions....
And I believe the answer is when you download the SDK zip from Android the folder "\tools" is the one you point it at - regardless of what you name \tools\ or where you put it, thats the one.
Please someone help me with this issue; i did a ANDROID_HOME; but the flutter still not working; what kind of SDK we choose the android one or the one installed with flutter!!! A picture exemple would be great!!! Thx.
if i know my android sdk path, how do i update android_home to that path?
Reacted by Atharva Dharmadhikari and Abhinav Jain- added a commit that references this issue
on Oct 15, 2018 if i know my android sdk path, how do i update android_home to that path?
depends on your MACOS.
for zsh you need to create a new file named.zshrcand set the path.export $ANDROID_HOME=[PATH-TO-Android-SDK]
if you use then you need to edit your.bashrcThis thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked and limited conversation to collaborators
on Apr 26, 2020
Yet I seem to have an SDK: