Finding Android SDK on Mac and adding to PATH
1. How to find it
- Open Android studio, go to Android Studio > Preferences
- Search for
sdk
- Something similar to this (this is a Windows box as you can see) will show
You can see the location there – most of the time it is:
/Users/<name>/Library/Android/sdk
2. How to install it, if not there
- Go to Android standalone SDK download page
- Download the zip file for macOS
- Extract it to a directory
3. How to add it to the path
Open your Terminal edit your ~/.bash_profile
file in nano by typing:
nano ~/.bash_profile
If you use Zsh, edit ~/.zshrc
instead.
Go to the end of the file and add the directory path to your $PATH
:
export PATH="${HOME}/Library/Android/sdk/tools:${HOME}/Library/Android/sdk/platform-tools:${PATH}"
- Save it by pressing
Ctrl+X
- Restart the Terminal
- To see if it is working or not, type in the name of any file or binary which are inside the directories that you've added (e.g.
adb
) and verify it is opened/executed
How do I find Android SDK Manager path on Mac
Goto File --> Settings --> System Settings --> Android SDK
On top you can see the SDK location
Android Studio SDK location
Download the SDK from here: http://developer.android.com/sdk/ to C:\android-sdk\.
Then when you launch Android Studio again, it will prompt you for the SDK path just point it to: C:\android-sdk\.
Update: new download location, https://developer.android.com/studio/#command-tools
How to give Flutter SDK Path in Android Studio on Mac os, How to update Flutter SDK path in MACOS?
I tried to find out the solution did not got solution..
Finally this are the steps i have implemented and works for me.
Prerequisites :-
Install Android studio
Install plugins to kick start flutter projects (DART,FLUTTER)
You can find out this inside android studio --> preferences --> Plugins
Now you have to setup Flutter SDK path to your Android studio
Download the Flutter SDK
Extract it where do you want (for example - /Users/vrushali/Downloads/flutter)
- Open your Android studio --> start a new Flutter Project --> select default application --> next --> select flutter sdk path --> browse to the . location where you have download and extract your flutter sdk --> select the flutter --> bin --> and say okay
All set..! Your project will get created in some time :)
How do I open the sdk manager in the Mac
Just cd into the installed SDK path like this
cd /Users/<mac-user>/<path to sdk folder>/tools/bin && ./sdkmanager
Where <mac-user>
is your username to the MAC
For example:
cd /Users/user/android-sdk-macosx/tools/bin && ./sdkmanager
OLD ANSWER
cd /Users/<mac-user>/<path to sdk folder>/tools && ./android
where <mac-user>
is your username to the MAC
For example in my own case, executing the following opens the SDK manager for me
cd /Users/user/android-sdk-macosx/tools && ./android
Set ANDROID_HOME environment variable in mac
Open the terminal and type :
export ANDROID_HOME=/Applications/ADT/sdk
Add this to the PATH environment variable
export PATH=$PATH:$ANDROID_HOME/platform-tools
If the terminal doesn't locate the added path(s) from the .zshrc, please run this command
source ~/.zshrc
Hope it works to you!
Android SDK path on Mac missing
Library is a hidden folder. If you open Finder and click the Go menu and hold the Option key you'll see it there.
Android SDK is not found although ANDROID_HOME is set successfully (android Studio on MacOS)
This may be related to the standard "Android SDK Tools" being marked as "Obsolete" in Android Studio.
- Depending on your AS version, either uncheck "Hide Obsolete Packages" or check "Obsolete" so obsolete options are displayed.
- Select and install "Android SDK Tools (Obsolete)".
- Once that completed, add the following lines to your
.zshrc
profile with the rest of the exports:
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
Related Topics
How to Use Firebase Functions to Send Fcm to User
How to Convert Date Format in Android
How to Have a Masked Numeric Input Field
How to Display List of Resource Drawables
Firebase Servervalue.Timestamp in Java Data Models Objects
What Is Metadata ? and What Is The Use of It in Android
Android: HTML in Textview with Link Clickable
Android: Support Multiple Screens
Bordercolor Not Picking The Lineargradient Color on Android
Android, How to Read Qr Code in My Application
How to Secure My App Against Piracy
Error Building Android Library: Direct Local .Aar File Dependencies Are Not Supported